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

normalize paths before checking allowed dirs #496

Merged
merged 4 commits into from Jan 22, 2016

Conversation

Projects
None yet
3 participants
@demidovsky
Contributor

demidovsky commented Dec 4, 2015

Turns windows-style slashes into unix-style, and makes drive letters lowercase. Fixes false errors like "File ... is outside $allowDirs" at systems running under Windows.

@demidovsky

This comment has been minimized.

Show comment
Hide comment
@demidovsky

demidovsky Dec 5, 2015

Owner

Not sure about the last one, but without it - options['allowDirs'] was always document root (when comparing paths).

Owner

demidovsky commented on 01d4835 Dec 5, 2015

Not sure about the last one, but without it - options['allowDirs'] was always document root (when comparing paths).

* @param string $path
* @return string
*/
public function getNormalizedPath($path)

This comment has been minimized.

@mrclay

mrclay Jan 20, 2016

Owner

Please make this private, replace the line comments with a summary in the phpdoc, and for the $path specify that this only handles absolute file paths.

@mrclay

mrclay Jan 20, 2016

Owner

Please make this private, replace the line comments with a summary in the phpdoc, and for the $path specify that this only handles absolute file paths.

@glensc glensc merged commit 01d4835 into mrclay:master Jan 22, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

glensc added a commit that referenced this pull request Jan 22, 2016

glensc added a commit that referenced this pull request Jan 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment