-
-
Notifications
You must be signed in to change notification settings - Fork 849
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
FS#2867, ACL processing may fail with utf-8 characters which include byte 'A0'. #395
Conversation
More unit tests to come. |
I wonder if we have this problem in other files as well confutils comes to mind. Should we grep the sources for \s and \S? |
@Chris--S what's the status here? Can I merge this as is? |
Problem fully understood. Test written. So yes, you can now. Underlying problem, the characters which '/\s/' will match can vary depending on the locale. (see setlocale() & LC_CTYPE [1]). Outside 3rd party libraries, there aren't so many uses of '\s'. In some of these uses the object string may not be able to contain non-ascii characters or the match must happen before they could occur (e.g. config files). Though, that is probably not the most robust of assumptions. Three solutions:
[1] - http://php.net/manual/en/function.setlocale.php |
FS#2867, ACL processing may fail with utf-8 characters which include byte 'A0'.
More detailed discussion and explanations at https://bugs.dokuwiki.org/index.php?do=details&task_id=2867
Summary.
Under some circumstances '\s' may match bytes 'A0' & '85'. These bytes can occur as part of non-space utf8 characters. Conversely, '\S' may not match these bytes for the same reason.