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

Use of Locale Unsafe functions #2084

Open
tcyrus opened this issue Jul 2, 2018 · 1 comment
Open

Use of Locale Unsafe functions #2084

tcyrus opened this issue Jul 2, 2018 · 1 comment

Comments

@tcyrus
Copy link
Contributor

tcyrus commented Jul 2, 2018

basename, dirname, and pathinfo are locale aware, meaning that they will only handle characters that match up with the PHP default locale (ASCII). For example, Using Non-ASCII Unicode filenames for Media files would cause Grav to ignore them, since it used basename for checks (Fixed in #2083). There is a similar issue here with the use of pathinfo (See php.net for more info):

One solution is to make a set of locale safe helper functions. I have made a set of helper functions that can be used as an example here.

@rhukster
Copy link
Member

rhukster commented Jul 6, 2018

@tcyrus tcyrus changed the title pathinfo is Locale Aware Use of Locale Unsafe functions Jul 6, 2018
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