1 diff --git a/index.php b/index.php
2 index c102e42..3271e53 100644
5 @@ -43,7 +43,7 @@ define('WEB_PATH', substr($_SERVER["REQUEST_URI"], 0, 1+strrpos($_SERVER["REQUES
6 // Force cookie path (but do not change lifetime)
7 $cookie=session_get_cookie_params();
8 $cookiedir = ''; if(dirname($_SERVER['SCRIPT_NAME'])!='/') $cookiedir=dirname($_SERVER["SCRIPT_NAME"]).'/';
9 -session_set_cookie_params($cookie['lifetime'],$cookiedir,$_SERVER['HTTP_HOST']); // Set default cookie expiration and path.
10 +session_set_cookie_params($cookie['lifetime'],$cookiedir,$_SERVER['SERVER_NAME']); // Set default cookie expiration and path.
12 // Set session parameters on server side.
13 define('INACTIVITY_TIMEOUT',3600); // (in seconds). If the user does not access any page within this time, his/her session is considered expired.
14 @@ -610,6 +610,7 @@ function getToken()
16 $rnd = sha1(uniqid('',true).'_'.mt_rand().$GLOBALS['salt']); // We generate a random string.
17 $_SESSION['tokens'][$rnd]=1; // Store it on the server side.
18 + logm("getToken(); // token: ".$rnd);
22 @@ -617,6 +618,7 @@ function getToken()
24 function tokenOk($token)
26 + logm("tokenOk('".$token."'); // _SESSION['tokens']=[".implode(", ", array_keys($_SESSION['tokens']))."]");
27 if (isset($_SESSION['tokens'][$token]))
29 unset($_SESSION['tokens'][$token]); // Token is used: destroy it.
30 @@ -1355,6 +1357,7 @@ function renderPage()
34 + logm("QUERY_STRING: '".$_SERVER["QUERY_STRING"]."'");
35 // -------- User wants to change his/her password.
36 if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=changepasswd'))