diff options
author | VirtualTam <virtualtam@flibidi.net> | 2017-10-22 19:54:44 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2017-10-22 19:54:44 +0200 |
commit | fd7d84616d53486c3a276a42da869390e1d7f5eb (patch) | |
tree | 215f22ad244d734d77c3dd4a38f52da689fa6dd7 /index.php | |
parent | ebd650c06c67a67da2a0d099f625b6a7ec62ab2b (diff) | |
download | Shaarli-fd7d84616d53486c3a276a42da869390e1d7f5eb.tar.gz Shaarli-fd7d84616d53486c3a276a42da869390e1d7f5eb.tar.zst Shaarli-fd7d84616d53486c3a276a42da869390e1d7f5eb.zip |
Move session ID check to SessionManager
Relates to https://github.com/shaarli/Shaarli/issues/324
Changed:
- `is_session_id_valid()` -> `SessionManager::checkId()`
- update tests
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -116,7 +116,7 @@ if (session_id() == '') { | |||
116 | } | 116 | } |
117 | 117 | ||
118 | // Regenerate session ID if invalid or not defined in cookie. | 118 | // Regenerate session ID if invalid or not defined in cookie. |
119 | if (isset($_COOKIE['shaarli']) && !is_session_id_valid($_COOKIE['shaarli'])) { | 119 | if (isset($_COOKIE['shaarli']) && !SessionManager::checkId($_COOKIE['shaarli'])) { |
120 | session_regenerate_id(true); | 120 | session_regenerate_id(true); |
121 | $_COOKIE['shaarli'] = session_id(); | 121 | $_COOKIE['shaarli'] = session_id(); |
122 | } | 122 | } |