Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is FindRolesWithinJWTClaims looking for a "Authorization" header in responses? #28

Closed
ngregoire opened this issue Dec 6, 2023 · 1 comment

Comments

@ngregoire
Copy link

I'm surprised to see that this bambda is looking for a Authorization header in responses. Maybe that exists, but it seems quite uncommon to send back a JWT that way.

Here's my own version, looking for JWT in request header Authorization

if (requestResponse.hasResponse() && requestResponse.request().hasHeader("authorization")) {
    var authValue = requestResponse.request().headerValue("authorization");
    if (authValue.startsWith("Bearer ey")) {
        if (authValue.split("\\.").length == 3) {
           return true;
        }
    }
}
return false;
@PortSwiggerWiener
Copy link
Collaborator

Agreed. I've removed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants