Skip to content

Bad regex in CORS settings should throw a nicer error #29108

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

Closed
wants to merge 1 commit into from
Closed

Bad regex in CORS settings should throw a nicer error #29108

wants to merge 1 commit into from

Conversation

romseygeek
Copy link
Contributor

Currently a bad regex in CORS settings throws a PatternSyntaxException, which
then bubbles up through the bootstrap code, meaning users have to parse a
stack trace to work out where the problem is. We should instead catch this
exception and rethrow with a more useful error message.

Currently a bad regex in CORS settings throws a PatternSyntaxException, which
then bubbles up through the bootstrap code, meaning users have to parse a
stack trace to work out where the problem is.  We should instead catch this
exception and rethrow with a more useful error message.
@romseygeek romseygeek self-assigned this Mar 16, 2018
@romseygeek romseygeek requested a review from jasontedor March 16, 2018 10:27
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@danielmitterdorfer
Copy link
Member

@romseygeek I'm sorry to see that the review of this fell through the cracks. Would you mind updating your PR please? Then I'll review it. Note that we have an NIO transport as well meanwhile so this change should also be applied to org.elasticsearch.http.nio.NioHttpServerTransport#buildCorsConfig().

@romseygeek
Copy link
Contributor Author

Thanks @danielmitterdorfer, I've opened a new PR at #34035 and will close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants