CORS middleware issue when origin host starts with a digit
See original GitHub issueWe have noticed an issue with the CORS middleware (default CORS.policy
implementation) whereby it doesn’t recognise a request as a CORS request if the host in the Origin
header starts with a digit. For example, a CORS request with header Origin: https://www.example.com
will work correctly, but a CORS request with header Origin: https://2ww.example.com
will not.
This is an issue in the 0.23.6
release but it looks like it has already been fixed in the series/0.23
branch (presumably via one of the merges into that branch that have occurred since 0.23.6
was cut). I think the issue is caused by a missing .backtrack
in the Rfc3986.ipv4Address
parser meaning that in the case where the host starts with a digit, we never actually run the subsequent parser which should match the RegName
host. Compare in v0.23.6
vs in series/0.23
.
If the above is correct, would it be possible to get a release cut from the current series/0.23
branch so that we can just upgrade to fix the issue? 🙏
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Ah yep I can get it now. Apologies, for some reason I couldn’t see it when I checked yesterday morning.
The website publishing failed because of that, but I see 0.23.7 jars on Maven Central. The Sonatype publish happens before the website publish in that job. Let me know if you’re still unable to resolve them.