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

Adding check is path is unset (or "/") for web_listen_uri parameter. #2208

Merged
merged 3 commits into from May 10, 2016

Conversation

dennisoelkers
Copy link
Member

Right now we cannot handle a path prefix for the web interface assets, because of the way they are bundled. The config parameter allows one, so we need to explicitly check for it and raise an error when it is set to prevent undefined/unexpected behavior.

Fixes #2191.

@dennisoelkers dennisoelkers added this to the 2.0.1 milestone May 10, 2016
public class WebListenUriValidator implements Validator<URI> {
@Override
public void validate(String name, URI value) throws ValidationException {
if (value != null && !value.getPath().equals("/")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately URI#getPath() can return null which would lead to a NullPointerException here. Maybe just invert the second condition ("/".equals(…)).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 - thanks for the hint! :)

@joschi joschi self-assigned this May 10, 2016
@joschi
Copy link
Contributor

joschi commented May 10, 2016

LGTM. 👍

@joschi joschi merged commit 0d80381 into master May 10, 2016
@joschi joschi deleted the issue-2191 branch May 10, 2016 10:08
joschi pushed a commit that referenced this pull request May 10, 2016
joschi pushed a commit to Graylog2/documentation that referenced this pull request May 10, 2016
@joschi joschi added the web label May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Graylog 2.0 web server - Unable to specify application context
2 participants