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

JWT Example shows timing attack #100

Open
perpetual-hydrofoil opened this issue Jul 29, 2019 · 0 comments
Open

JWT Example shows timing attack #100

perpetual-hydrofoil opened this issue Jul 29, 2019 · 0 comments

Comments

@perpetual-hydrofoil
Copy link

perpetual-hydrofoil commented Jul 29, 2019

In https://echo.labstack.com/cookbook/jwt , == results in a timing attack (even if you are comparing hashes like this: hash(webPassword) == savedHashedPassword).

The example code should probably have at least a comment // example only; string comparisons are vulnerable to timing attacks and perhaps another comment that even just hashed passwords should use the timing-attack-resistant comparison functions within the hash library, rather than a regular == string comparison.

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

No branches or pull requests

1 participant