backport
authorPascal Corpet <pascal.corpet@m4x.org>
Mon, 23 May 2005 15:16:17 +0000 (15:16 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:29:01 +0000 (23:29 +0200)
Patches applied:

 * opensource@polytechnique.org--2005/platal--release--0.9.6--patch-18
   bug : connexion juste apres une deconnexion pour xnet

git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-653

include/xnet/session.inc.php

index 449f38e..e894f9b 100644 (file)
@@ -43,7 +43,11 @@ class XnetSession extends DiogenesCoreSession
             $_SESSION['session'] = new XnetSession;
         }
         if (!logged()) {
-            $returl = "http://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}";
+            // prevent connexion to be linked to deconnexion
+            if (($i = strpos($_SERVER['REQUEST_URI'], 'deconnexion.php')) !== false)
+                $returl = "http://{$_SERVER['SERVER_NAME']}".substr($_SERVER['REQUEST_URI'], 0, $i);
+            else
+                $returl = "http://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}";
             $url  = "https://www.polytechnique.org/auth-groupex.php";
             $url .= "?session=" . session_id();
             $url .= "&challenge=" . $_SESSION['session']->challenge;