-
Notifications
You must be signed in to change notification settings - Fork 866
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
Review host matching validation #25
Comments
Is there any workaround for IDN support? I need to route requests based on IDN host |
@mifopen IDN support should be possible, we just haven't tried it yet. Are you willing to do a little experimentation? First we need to figure out which format the HostMatcherPolicy requires, unicode or punycode. I think it's unicode from looking at the code: Second, I think this regex validation needs to be removed to allow for unicode characters: |
#817 removed the offending regex because it was preventing hosts with ports. We still need to add some tests for IDNs, host:port, etc.. |
Triage: We need the IDN part which is still missing. |
The RouteValidator uses a strict regex to check the host matching pattern. I have my doubts that this level of validation is even needed. The source is developer input, not external input, and it's only used in the route matcher (HostAttribute). We should be careful about second guessing what the HostMatcherPolicy can handle. For example the regex doesn't allow IDNs (Unicode hosts).
Preferably we'd use a validation helper provided directly by the framework so they'd be in sync.
The text was updated successfully, but these errors were encountered: