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

CompletionSuggest should throw an exception if input string contains a reserved character. #3648

Closed
s1monw opened this issue Sep 8, 2013 · 4 comments

Comments

@s1monw
Copy link
Contributor

s1monw commented Sep 8, 2013

Currently the CompletionSuggester reserves 0x00 and 0xFF for internal use. We should throw an exception if those characters are used in an input string.

@ghost ghost assigned s1monw Sep 8, 2013
@nik9000
Copy link
Member

nik9000 commented Sep 8, 2013

I just wanted to make sure this isn't a problem with UTF8/16 characters.

@s1monw
Copy link
Contributor Author

s1monw commented Sep 9, 2013

@nik9000 not sure if I understand your comment?

@s1monw s1monw closed this as completed in 732e38b Sep 9, 2013
s1monw added a commit that referenced this issue Sep 9, 2013
The completion suggester reserves 0x00 and 0xFF as for internal use.
If those chars are used in the input string an IAE is thrown and the
input is rejected.

Closes #3648
@nik9000
Copy link
Member

nik9000 commented Sep 9, 2013

I'm not up on exactly how UTF8 an UTF16 represent all the characters but I just wanted to make sure that if one of the bytes in one of the code points is 0x00 or 0xFF the suggester doesn't reject it.

@s1monw
Copy link
Contributor Author

s1monw commented Sep 9, 2013

see my comment - 0xFF is actually not valid and 0x00 can only be a single byte char so it will also be the 0 UTF-16 CP http://en.wikipedia.org/wiki/UTF-8

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
The completion suggester reserves 0x00 and 0xFF as for internal use.
If those chars are used in the input string an IAE is thrown and the
input is rejected.

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

No branches or pull requests

2 participants