]> source.dussan.org Git - nextcloud-server.git/commitdiff
Changed the disputed while loop to a single if.
authordratini0 <dratini0@gmail.com>
Mon, 23 Mar 2015 15:12:03 +0000 (16:12 +0100)
committerdratini0 <dratini0@gmail.com>
Mon, 23 Mar 2015 15:12:03 +0000 (16:12 +0100)
lib/private/files.php

index 3a2e291630be90e8e5d45afc2676928128c3f0a7..6d165bcc70584b0a3fe138a1cfaa469093c1360c 100644 (file)
@@ -184,8 +184,8 @@ class OC_Files {
                if (isset($_SERVER['MOD_X_ACCEL_REDIRECT_ENABLED'])) {
                        if (isset($_SERVER['MOD_X_ACCEL_REDIRECT_PREFIX'])) {
                                $prefix = $_SERVER['MOD_X_ACCEL_REDIRECT_PREFIX'];
-                               // nginx is picky about double slashes
-                               while($prefix[strlen($prefix) - 1] === '/'){
+                               // nginx is picky about double slashes when matching locations
+                               if($prefix[strlen($prefix) - 1] === '/'){
                                        $prefix = substr($prefix, 0, -1);
                                }
                                $filename = $prefix . \OC\Files\Filesystem::getLocalFile($filename);