Commit:    782788e0d0ad0149827a64663b311abe879604d4
Author:    Hannes Magnusson <[email protected]>         Thu, 21 Nov 2013 
10:00:58 -0800
Parents:   62086b0b0fd0b72d512f2783c58fdafaca975d58
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=782788e0d0ad0149827a64663b311abe879604d4

Log:
Un-taint the base tag with "./" things :)

Changed paths:
  M  include/site.inc


Diff:
diff --git a/include/site.inc b/include/site.inc
index 3137fc8..1639ddd 100644
--- a/include/site.inc
+++ b/include/site.inc
@@ -553,7 +553,10 @@ if (isset($_SERVER['MIRROR_STATS'])) {
 // Provide base href information to make relative links on
 // shortcut URL accessed pages work without redirection
 if (isset($_SERVER['BASE_PAGE'])) {
-    $dirname = dirname($_SERVER['BASE_PAGE']);
-    $_SERVER['BASE_HREF'] = $MYSITE . $dirname . "/";
+    $dirname = dirname($_SERVER['BASE_PAGE']) . "/";
+    if ($dirname == "./") {
+        $dirname = "";
+    }
+    $_SERVER['BASE_HREF'] = $MYSITE . $dirname;
 } else { unset($_SERVER['BASE_HREF']); }


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to