diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-01-10 17:35:40 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-01-10 17:35:40 +0100 |
commit | c91d47e5b3ad8b2b6d30f7f4fdeff1a1d7e744a5 (patch) | |
tree | b53758a37f09c65a40f023dc4655203bf8df2d11 /lib/private/files | |
parent | c259733b881138c273b4af18d788f3df53497871 (diff) | |
parent | 05615bfd473f1eafa4ec253779568ab044467ceb (diff) | |
download | nextcloud-server-c91d47e5b3ad8b2b6d30f7f4fdeff1a1d7e744a5.tar.gz nextcloud-server-c91d47e5b3ad8b2b6d30f7f4fdeff1a1d7e744a5.zip |
Merge pull request #13224 from owncloud/simplify-is-valid-path-and-add-unit-tests
Simplify isValidPath and add unit tests
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/filesystem.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index bc43eb5d1ce..100b364ca06 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -504,7 +504,7 @@ class Filesystem { if (!$path || $path[0] !== '/') { $path = '/' . $path; } - if (strstr($path, '/../') || strrchr($path, '/') === '/..') { + if (strpos($path, '/../') !== FALSE || strrchr($path, '/') === '/..') { return false; } return true; |