1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00

Merge pull request #1434 from PineappleIOnic/fix-JWT-Abuse-Key-Fix

Fix Abuse Keys
This commit is contained in:
Eldad A. Fux 2021-07-27 14:59:06 +03:00 committed by GitHub
commit 957588a60e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -782,7 +782,7 @@ App::post('/v1/account/jwt')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_JWT)
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},userId:{param-userId}')
->label('abuse-key', 'url:{url},userId:{userId}')
->inject('response')
->inject('user')
->action(function ($response, $user) {
@ -1668,7 +1668,7 @@ App::post('/v1/account/verification')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_TOKEN)
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},email:{param-email}')
->label('abuse-key', 'url:{url},userId:{userId}')
->param('url', '', function ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', false, ['clients']) // TODO add built-in confirm page
->inject('request')
->inject('response')