]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - index.php
OAuth: Fix rare problem in which request tokens were sometimes being
[quix0rs-gnu-social.git] / index.php
index b060a3d52ac9ec9c60214702bc2a2c1b63dd63a8..6f011e7e5bba37bcf7a0dce17765a75625c9ca6d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -204,7 +204,7 @@ function main()
 {
     // fake HTTP redirects using lighttpd's 404 redirects
     if (strpos($_SERVER['SERVER_SOFTWARE'], 'lighttpd') !== false) {
-        $_lighty_url = $base_url.$_SERVER['REQUEST_URI'];
+        $_lighty_url = $_SERVER['REQUEST_URI'];
         $_lighty_url = @parse_url($_lighty_url);
 
         if ($_lighty_url['path'] != '/index.php' && $_lighty_url['path'] != '/') {
@@ -272,11 +272,7 @@ function main()
         return;
     }
 
-    // Note the order here: arguments from the URL mapper will
-    // override request params that have been sent. This ensures
-    // that for instance an action parameter can't be overridden
-    // with an arbitrary action class.
-    $args = array_merge($_REQUEST, $args);
+    $args = array_merge($args, $_REQUEST);
 
     Event::handle('ArgsInitialize', array(&$args));