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

Timing Vulnerability #5

Open
jder opened this issue Apr 8, 2015 · 0 comments
Open

Timing Vulnerability #5

jder opened this issue Apr 8, 2015 · 0 comments

Comments

@jder
Copy link

jder commented Apr 8, 2015

I think the equality comparison on this line needs to be constant-time to avoid a timing vulnerability:

if oauth_access_token == expected_token and oauth_expires and oauth_expires > ngx.time() then

Currently, an attacker could choose an arbitrary email and expiry date and use the time taken by the equality check to find the correct value for oauth_access_token. They would then be logged in as the targeted email address. It seems like this would probably take days/weeks of sustained traffic to pull off.

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