]> source.dussan.org Git - nextcloud-server.git/commitdiff
FIX: Download of files named "true" or "false" impossible
authorRoland Hager <roland.hager@tu-berlin.de>
Fri, 7 Jun 2013 11:44:17 +0000 (13:44 +0200)
committerRoland Hager <roland.hager@tu-berlin.de>
Wed, 12 Jun 2013 15:25:21 +0000 (17:25 +0200)
It was not possible to download a file called "true" or "false" (caseinsensitive) when clicking the link "download" due to the result of json_decode().
Both cases are now implicitly checked.

Hotfix provided by Herbert Pophal

apps/files/ajax/download.php

index 7c8dcb372e24c5d4517b1ac5459e1c03feb9744a..222eba551d472f17d4b1e4675611e09cb8563833 100644 (file)
@@ -34,8 +34,9 @@ $files = $_GET["files"];
 $dir = $_GET["dir"];
 
 $files_list = json_decode($files);
+
 // in case we get only a single file
-if ($files_list === NULL ) {
+if ($files_list === NULL || $files_list === true || $files_list === false) {
        $files_list = array($files);
 }