Merge branch 'bug-1192' into release
authorBenny Baumann <BenBE@geshi.org>
Sun, 23 Nov 2014 14:02:16 +0000 (15:02 +0100)
committerBenny Baumann <BenBE@geshi.org>
Sun, 23 Nov 2014 14:02:16 +0000 (15:02 +0100)
1  2 
includes/loggedin.php
www/index.php

                        {
                                if($key == '_config' || $key == 'mconn' || 'csrf_' == substr($key, 0, 5))
                                        continue;
 -                              unset($_SESSION[$key]);
 -                              unset($$key);
 -                              //session_unregister($key);
 +                              unset($_SESSION[$key]);
 +                              unset($$key);
 +                              //session_unregister($key);
                        }
  
-                       $_SESSION['_config']['oldlocation'] = '';
-                       foreach($_GET as $key => $val)
-                       {
-                               if($_SESSION['_config']['oldlocation'])
-                                       $_SESSION['_config']['oldlocation'] .= "&";
-                               $key = str_replace(array("\n", "\r"), '', $key);
-                               $val = str_replace(array("\n", "\r"), '', $val);
-                               $_SESSION['_config']['oldlocation'] .= "$key=$val";
-                       }
-                       $_SESSION['_config']['oldlocation'] = substr($_SERVER['SCRIPT_NAME'], 1)."?".$_SESSION['_config']['oldlocation'];
-                       header("location: https://".$_SESSION['_config']['securehostname']."/index.php?id=4");
+                       $_SESSION['_config']['oldlocation'] = $_SERVER['REQUEST_URI'];
+                       header("Location: https://{$_SESSION['_config']['securehostname']}/index.php?id=4");
                        exit;
                }
        }
                $_SESSION['profile'] = "";
                foreach($_SESSION as $key => $value)
                {
 -                      unset($_SESSION[$key]);
 -                      unset($$key);
 -                      //session_unregister($key);
 +                      unset($_SESSION[$key]);
 +                      unset($$key);
 +                      //session_unregister($key);
                }
  
-               header("location: https://".$normalhost."/index.php");
+               header("Location: https://{$normalhost}/index.php");
                exit;
        }
  
diff --cc www/index.php
Simple merge