-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Parser doesn't throw SignatureException if no signature is included #90
Comments
Hi, JJWT was mentioned in the article you referenced: It is not vulnerable if you use the API correctly. In this case, you're using the If you know for sure what type of token you require (e.g. JWS), you need to call parsePlaintextJws or parseClaimsJws so that it does the appropriate validation. This is reflected in the various That said, if you have recommendations on how to improve the user experience such that this would not have confused you, please do let us know - if you had problems with this, others may as well, and we'd like to make it even easier to use if possible! Thanks! |
Thanks for the clarification. You are right. Why/How I made this mistake: I just was looking for a method to validate a given signed token string. At this point I'm not interested in checking for any claims.
Some minor things: I like the library and this could have been avoided by checking the documentation more carefully. Maybe its a little bit unfortunate that the documentation of the API are the "Release Notes" which are in a chronological order. After the "Usage" Part I would have expected something like "Hey, and these are the Methods you are interested in: [Known Type convenience parse methods]". The project has a nice JavaDoc documentation, it would be great to have a link to a online version on top of the projects page. I usually don't browse through it in my IDE and often I just want to have a look without setting up a project and adding the library. Beside that, thanks for providing the library. :-) |
I'm not sure if Closing the issue prevents commenting, so feel free to close :-) |
@echox thanks for the feedback! We'll definitely try to make the docs better. Your bullet list of thought progression was really helpful and can help us figure out how to make the API simpler too. You can comment on closed issues, but I'll leave this one open to represent any work to simplify the documentation and/or any API methods. Thanks! |
This issue has been automatically marked as stale due to inactivity for 60 or more days. It will be closed in 7 days if no further activity occurs. |
Closed due to inactivity. |
Hi,
I think if a SigningKey is set and the token doesn't contain any signature, a SignatureException should be thrown.
I think this would also address the vulnerabilities mentioned here: https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
Example:
The text was updated successfully, but these errors were encountered: