aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/elgglib.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 8bbdf8758..2ca1f90e3 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -447,7 +447,8 @@ function sanitise_filepath($path, $append_slash = TRUE) {
// Convert to correct UNIX paths
$path = str_replace('\\', '/', $path);
$path = str_replace('../', '/', $path);
- $path = str_replace('//', '/', $path);
+ // replace // with / except when preceeded by :
+ $path = preg_replace("/([^:])\/\//", "$1/", $path);
// Sort trailing slash
$path = trim($path);