summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-02-13 12:49:34 +0100
committerLukas Reschke <lukas@owncloud.com>2015-06-01 17:05:08 +0200
commit7b5493ea21925391e0cb6480faabb1c465b3437e (patch)
tree5b561ef5040410dacfbc75bf2df69bfd01698ece /apps/files
parent6867d45ffc931973e2720ad20e1020de84a77175 (diff)
downloadnextcloud-server-7b5493ea21925391e0cb6480faabb1c465b3437e.tar.gz
nextcloud-server-7b5493ea21925391e0cb6480faabb1c465b3437e.zip
Ensure that passed argument is always a string
Some code paths called the `normalizePath` functionality with types other than a string which resulted in unexpected behaviour. Thus the function is now manually casting the type to a string and I corrected the usage in list.php as well.
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/ajax/list.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php
index f9facd0d7f7..8ede52952f3 100644
--- a/apps/files/ajax/list.php
+++ b/apps/files/ajax/list.php
@@ -5,7 +5,7 @@ OCP\JSON::checkLoggedIn();
$l = \OC::$server->getL10N('files');
// Load the files
-$dir = isset($_GET['dir']) ? $_GET['dir'] : '';
+$dir = isset($_GET['dir']) ? (string)$_GET['dir'] : '';
$dir = \OC\Files\Filesystem::normalizePath($dir);
try {