-
-
Notifications
You must be signed in to change notification settings - Fork 601
[v4.0] Add stricter ValidAt constraint #554
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
Comments
Lines 67 to 75 in 6d8665c
Pretty dangerous too! |
@Slamdunk can we turn it into a test case? Seems like an oversight that could have security implications |
I tried to get I'm totally against this, but wanted to wait @lcobucci for a reply before a PR |
This constraint was created based in the behaviour we had in v3.x (nothing fails when claims aren't set). We cannot rename it any more (BC-break) but can definitely create the strict one (which makes sure we have the claims before of performing the validations with the Does it make sense to you @Slamdunk? |
We can proxy I'll PR everything soon if it's ok to you. A |
@Slamdunk sounds like a plan 👍 |
Hi, it seems to me that the new
ValidAt
constraint is very dangerous:jwt/test/unit/Validation/Constraint/ValidAtTest.php
Lines 218 to 225 in 6d8665c
It creates a false sense of security, and it's easy to mess with: I've already had a successful token misused because no time claim was set.
I propose to rename
ValidAt
toLooseValidAt
, and introduce a newStrictValidAt
that requires all time claims to be setThe text was updated successfully, but these errors were encountered: