-
Notifications
You must be signed in to change notification settings - Fork 3
Fix entryLocale validation code
#6
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
Conversation
|
Previously, |
src/desktopfilereader.cpp
Outdated
| (c >= 'a' && c <= 'z') || | ||
| (c == '_') || (c == '@') | ||
| (c == '_') || (c == '@') || | ||
| (c == '[') || (c == ']') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This permits the use of [ characters inside the locale part. I think you should remove this line, and iterate over the inner part only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, no, this is handled elsewhere already. However, I find it confusing to permit these here. I am going to update your branch to iterate only over the inner part of the string.
|
We need to add a test case to make sure this won't happen again in the future. |
|
Seems like the existing check is already pretty broken. We have a test that is failing already on a locale like |
No description provided.