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

Projects
None yet
2 participants
@s1monw
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Sep 8, 2013

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

@s1monw

This comment has been minimized.

Copy link
Contributor Author

commented Sep 9, 2013

@nik9000 not sure if I understand your comment?

@s1monw s1monw closed this in 732e38b Sep 9, 2013

s1monw added a commit that referenced this issue Sep 9, 2013

Throw IAE if reserved completion suggester chars are used in input
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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

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

Throw IAE if reserved completion suggester chars are used in input
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
You can’t perform that action at this time.