]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
sanitise_filepath() removes double /s.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 14 Dec 2010 03:24:59 +0000 (03:24 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 14 Dec 2010 03:24:59 +0000 (03:24 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7615 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/elgglib.php

index fe4e3e9d9730320072da0489171e4fb78b8cdd1c..cb0ee4e72c58176a7a9b003223221a67b0847b41 100644 (file)
@@ -447,6 +447,7 @@ function sanitise_filepath($path, $append_slash = TRUE) {
        // Convert to correct UNIX paths
        $path = str_replace('\\', '/', $path);
        $path = str_replace('../', '/', $path);
+       $path = str_replace('//', '/', $path);
 
        // Sort trailing slash
        $path = trim($path);