Skip to content

Commit

Permalink
Minz session cookie path bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkarex committed Jul 30, 2015
1 parent e597293 commit f7190c3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Minz/Session.php
Expand Up @@ -65,10 +65,9 @@ public static function unset_session($force = false) {
* @param $l la durée de vie
*/
public static function keepCookie($l) {
// Get the script_name (e.g. /p/i/index.php) and keep only the path.
$cookie_dir = empty($_SERVER['SCRIPT_NAME']) ? '' : $_SERVER['SCRIPT_NAME'];
$cookie_dir = dirname($cookie_dir);
session_set_cookie_params($l, $cookie_dir, '', false, true);
// Get the script_name (e.g. /p/i/index.php) and keep only the path.
$cookie_dir = dirname(empty($_SERVER['REQUEST_URI']) ? '/' : dirname($_SERVER['REQUEST_URI']));
session_set_cookie_params($l, $cookie_dir, '', false, false);
}


Expand Down

0 comments on commit f7190c3

Please sign in to comment.