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

Basic Auth middleware is not using a constant time compare function to check passwords #194

Closed
kcq opened this issue Sep 6, 2017 · 1 comment

Comments

@kcq
Copy link

kcq commented Sep 6, 2017

Line 35 in https://github.com/hellofresh/janus/blob/master/pkg/plugin/basic/middleware.go leaks timing information that can be used to "guess" the password value.

It's a good idea to use the ConstantTimeCompare function (crypto/subtle package).

@italolelis
Copy link
Contributor

Hi @kcq,

Thank you for this report. I'll work on this as soon as possible, or if you'd like you can send a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants