summaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-01-10 17:35:40 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-01-10 17:35:40 +0100
commitc91d47e5b3ad8b2b6d30f7f4fdeff1a1d7e744a5 (patch)
treeb53758a37f09c65a40f023dc4655203bf8df2d11 /lib/private/files
parentc259733b881138c273b4af18d788f3df53497871 (diff)
parent05615bfd473f1eafa4ec253779568ab044467ceb (diff)
downloadnextcloud-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.php2
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;