Commit 34bf637f authored by Arnaud Pauget's avatar Arnaud Pauget
Browse files

Merge branch 'feat/13798_add_secure_to_cookie_2.5.X' into 'release/2.5.5'

Feat/13798 add secure to cookie 2.5.x

See merge request !485
parents 2f701a54 a599c751
Pipeline #8162 canceled with stage
......@@ -943,7 +943,9 @@ class laabs
$cryptedToken = static::encrypt($jsonToken, static::getCryptKey());
$cookieToken = base64_encode($cryptedToken);
setcookie($cookieName, $cookieToken, $expirationTime, '/', null, false, $httpOnly);
$secure = (isset($_SERVER['LAABS_SECURE_COOKIE']) && $_SERVER['LAABS_SECURE_COOKIE'] == "On");
setcookie($cookieName, $cookieToken, $expirationTime, '/', null, $secure, $httpOnly);
$GLOBALS["TOKEN"][$name] = json_decode($jsonToken);
......
......@@ -32,6 +32,7 @@
SetEnv LAABS_DEPENDENCIES repository;xml;html;localisation;datasource;sdo;json;fileSystem;notification;PDF;csrf;timestamp
SetEnv LAABS_PRESENTATION maarchRM
SetEnv SERVICE_CLIENT_TOKEN service
#SetEnv LAABS_SECURE_COOKIE On
SetEnv LAABS_CONFIGURATION "../data/maarchRM/conf/configuration.ini"
SetEnv LAABS_LOG "../data/maarchRM/log.txt"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment