Skip to content

Conversation

@FCMHUB
Copy link
Contributor

@FCMHUB FCMHUB commented Oct 20, 2020

Fixed the 'and' operator precedence on JwtGuard::hasValidCredentials.
The wrong precedence was considering invalid credentials as valid because the user object was not null.

Please refer to the link below:
https://stackoverflow.com/a/2803576

I also adjusted the tests that were broken and created 2 tests to validate the fix.

Fix JwtGuard validation comparison
Implemented basic tests for JwtGuard
@whera
Copy link

whera commented Oct 20, 2020

👍

@ericyzhu ericyzhu merged commit 8824bcf into hyperf-ext:master Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants