Minz session cookie path bug

https://github.com/FreshRSS/FreshRSS/issues/924#issuecomment-126499403
This commit is contained in:
Alexandre Alapetite
2015-07-30 23:42:28 +02:00
parent e5972938b5
commit f7190c34e1

View File

@@ -65,10 +65,9 @@ class Minz_Session {
* @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);
}