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

Replace preg_match to strpos() while defining a temporary directory #326

Merged
merged 1 commit into from
Jun 6, 2021

Conversation

StudioMaX
Copy link
Collaborator

Check that the path to the temporary directory is in the open_basedir list using strpos instead of a regular expression
This also fixes the problem with rarely used paths like "/foo/bar#baz:/tmp", since # character is not escaped by preg_quote until PHP 7.3 (https://bugs.php.net/bug.php?id=75355). Sample: https://3v4l.org/N0h1f

… list using `strpos` instead of a regular expression

This also fixes the problem with rarely used paths like "/foo/bar#baz:/tmp", since # character is not escaped by preg_quote until PHP 7.3 (https://bugs.php.net/bug.php?id=75355)
@StudioMaX StudioMaX changed the title Replace preg_match to substr() while defining a temporary directory Replace preg_match to strpos() while defining a temporary directory Jun 6, 2021
@JamesHeinrich JamesHeinrich merged commit acf86e0 into JamesHeinrich:master Jun 6, 2021
@StudioMaX StudioMaX deleted the temp-dir-preg-quote branch June 6, 2021 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants