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

Trim the whitelisted emails #371

Open
kuboschek opened this issue Apr 21, 2024 · 0 comments
Open

Trim the whitelisted emails #371

kuboschek opened this issue Apr 21, 2024 · 0 comments

Comments

@kuboschek
Copy link

Just stumbled on this while configuring a rules' whitelist:

If I configured a@example.com, b@example.com, then both a@example.com and b@example.com (note the extra space) are authorized, but b@example.com isn't.

I suggest to either trim whitespace when checking, in this function:

https://github.com/thomseddon/traefik-forward-auth/blob/c4317b7503fb0528d002eb1e5ee43c4a37f055d0/internal/auth.go#L100C1-L108C2

Or to at least warn when parsing a rule with whitespace in an email. Happy to submit patches moving in either direction.

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