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

Domains are case sensitive #485

Open
pulecp opened this issue Jul 14, 2022 · 1 comment
Open

Domains are case sensitive #485

pulecp opened this issue Jul 14, 2022 · 1 comment

Comments

@pulecp
Copy link

pulecp commented Jul 14, 2022

Hello dear developers,

Describe the problem
I use Azure as a provider but I suppose that this issue affects all providers. The following log line should be self-explaining.

{"level":"warn","ts":xxx,"msg":"domain Example.com not found in any domains [example.com]"}

The domain comparison (I guess in this part of code for example) is case sensitive and does not allow to use just one variation like:

vouch:
  domains:
    - example.com

but I would have to use all cases like:

vouch:
  domains:
    - example.com
    - Example.com
    - exAMPle.com
    - ...

to match RFC1035 saying that domains are case in-sensitive.

Expected behavior

All domains (also for whitelisting of users) are case in-sensitive.

Thanks for taking this into consideration.

@bnfinet
Copy link
Member

bnfinet commented Aug 6, 2022

@pulecp yep, you're right, that's how it should work

All domains should be string.toLower()'d before comparison. Need to make sure that doesn't screw up unicode domains in any way. Perhaps there's a comparison library that should be used but I haven't gone searching for one.

issue #324 and PR #325 are similar and relevant

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