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

Use constant time equality check for auth token #14

Open
pethin opened this issue Feb 18, 2024 · 4 comments
Open

Use constant time equality check for auth token #14

pethin opened this issue Feb 18, 2024 · 4 comments

Comments

@pethin
Copy link

pethin commented Feb 18, 2024

Replace === with crypto.subtle.timingSafeEqual in https://github.com/Sh4yy/cloudflare-email/blob/main/src/middlewares/auth.ts#L16 to prevent timing attacks.

Example: https://developers.cloudflare.com/workers/examples/protect-against-timing-attacks/

@D3vl0per
Copy link

@kcoderhtml
Copy link

Can you create a PR @D3vl0per?

@D3vl0per
Copy link

Done #18 @kcoderhtml !

@kcoderhtml
Copy link

thnks! hopefully @Sh4yy can merge both our PRs soon!

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

3 participants