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

colon sign (:) not excluded from filenames #7148

Closed
picrin opened this issue Aug 4, 2014 · 3 comments
Closed

colon sign (:) not excluded from filenames #7148

picrin opened this issue Aug 4, 2014 · 3 comments
Labels

Comments

@picrin
Copy link

picrin commented Aug 4, 2014

Colon is not excluded from the list of invalid file names in org.elasticsearch.common.Strings.java in line 683. Mentioned line should read:

public static final ImmutableSet INVALID_FILENAME_CHARS = ImmutableSet.of('', '/', '*', '?', '"', '<', '>', '|', ' ', ',', ':');

This bug causes crash to elasticsearch on Windows with following curl line:
curl "http://localhost:9200/bitcoin:9200" -X POST

Here's the link to the code:
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/common/Strings.java#L683

@picrin
Copy link
Author

picrin commented Aug 4, 2014

Instead of blacklisting characters, one could validate for whitelisted characters.

@clintongormley
Copy link
Contributor

Agreed - we should whitelist instead.

Related to #6736

@clintongormley
Copy link
Contributor

Closing in favour of #9059

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

No branches or pull requests

2 participants