Commit 7e3728ce authored by enured's avatar enured
Browse files

B13842 Changed cookie params in session. Domain is not needed to give because...

B13842 Changed cookie params in session. Domain is not needed to give because we dont use subdomain. Better compatibility with qfqpdf.
parent ed925a11
Pipeline #6907 passed with stage
in 1 minute and 53 seconds
......@@ -72,7 +72,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";
$this->arrQfqPdfCookie[] = "name:$key,value:$value";
}
$linesForWkhtml = '';
for($i = 0; $i < count($wkhtml); $i++){
......
......@@ -60,12 +60,12 @@ class Session
// 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);
session_set_cookie_params($lifetime, $path.';SameSite='.$samesite, null, $secure, $httponly);
} else {
session_set_cookie_params([
'lifetime' => $lifetime,
'path' => $path,
'domain' => $_SERVER['HTTP_HOST'],
'domain' => null,
'secure' => $secure,
'httponly' => $httponly,
'samesite' => $samesite
......
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