diff options
| author | 2015-07-31 00:12:55 +0200 | |
|---|---|---|
| committer | 2015-07-31 00:12:55 +0200 | |
| commit | 59daed3d4eca6bf6260a8dc422c54f470895ac63 (patch) | |
| tree | 7ef2337e84fd18797ecb2e4a99f5d7a97375000b /lib/Minz/Session.php | |
| parent | f7190c34e1a1ea36bbc81a7dea8dcb7a39cea7cf (diff) | |
Minz slight change in session cookie path
https://github.com/FreshRSS/FreshRSS/issues/924#issuecomment-126499403
Diffstat (limited to 'lib/Minz/Session.php')
| -rw-r--r-- | lib/Minz/Session.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Minz/Session.php b/lib/Minz/Session.php index 14a093bf7..705aae2ec 100644 --- a/lib/Minz/Session.php +++ b/lib/Minz/Session.php @@ -66,7 +66,10 @@ class Minz_Session { */ public static function keepCookie($l) { // 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'])); + $cookie_dir = empty($_SERVER['REQUEST_URI']) ? '/' : $_SERVER['REQUEST_URI']; + if (substr($cookie_dir, -1) !== '/') { + $cookie_dir = dirname($cookie_dir) . '/'; + } session_set_cookie_params($l, $cookie_dir, '', false, false); } |
