Fix typos and missing case in the check for unreachable relative paths in titles.
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 3 Aug 2004 05:26:27 +0000 (05:26 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 3 Aug 2004 05:26:27 +0000 (05:26 +0000)
Fixes [ 760408 ] &quot;Relative&quot; paths in title cause browser trouble

includes/Title.php

index 961bdb8..03bcf97 100644 (file)
@@ -750,9 +750,10 @@ class Title {
                # "." and ".." conflict with the directories of those namesa
                if ( strpos( $r, "." ) !== false &&
                     ( $r === "." || $r === ".." ||
-                      strpos( $r, "./" ) === 0 ||
-                      strpos( $r, "/./" !== false ) ||
-                      strpos( $r, "/../" !== false ) ) )
+                      strpos( $r, "./" ) === 0  ||
+                      strpos( $r, "../" ) === 0 ||
+                      strpos( $r, "/./" ) !== false ||
+                      strpos( $r, "/../" ) !== false ) )
                {
                        wfProfileOut( $fname );
                        return false;