aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2017-10-22 19:54:44 +0200
committerVirtualTam <virtualtam@flibidi.net>2017-10-22 19:54:44 +0200
commitfd7d84616d53486c3a276a42da869390e1d7f5eb (patch)
tree215f22ad244d734d77c3dd4a38f52da689fa6dd7 /index.php
parentebd650c06c67a67da2a0d099f625b6a7ec62ab2b (diff)
downloadShaarli-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.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
index 9e698628..e1516d37 100644
--- a/index.php
+++ b/index.php
@@ -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.
119if (isset($_COOKIE['shaarli']) && !is_session_id_valid($_COOKIE['shaarli'])) { 119if (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}