Commit ed925a11 authored by enured's avatar enured
Browse files

B13842 Added documentation to samesite cookie and session cookie

parent b782f989
Pipeline #6906 passed with stage
in 2 minutes and 3 seconds
......@@ -71,6 +71,7 @@ class SessionCookie {
// $this->arrCookieString[] = "name:$key,value:$value,url:$domain,path:$path";
// qfqpdf seems to have problems if 'domain' is specified: it hangs by fetching the website. Skip domain.
// qfqpdf generates another cookie for pdf (SIPs then not reachable) if the given domain doesnt equal what is set in cookie params. Domain default from qfqpdf is without dot. We need to give the domain with previous dot.
$this->arrQfqPdfCookie[] = "name:$key,value:$value,domain:.$domain";
}
$linesForWkhtml = '';
......
......@@ -58,6 +58,7 @@ class Session
// Needed expire date for header() method
$expireDate = date("D, d-M-Y H:i:s", strtotime('+2 days')). ' GMT';
// More information about previous dots in domains: https://stackoverflow.com/questions/348282/php-cookie-domain-subdomain-control
if(PHP_VERSION_ID < 70300) {
session_set_cookie_params($lifetime, $path.';SameSite='.$samesite, $_SERVER['HTTP_HOST'], $secure, $httponly);
} else {
......
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