Last active
July 30, 2020 19:11
-
-
Save bagofarms/3b2c714dbae6fcb651ad504e61eda630 to your computer and use it in GitHub Desktop.
This patch allows UDOIT to be used with Chrome's new secure-by-default cookie policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Patch for older versions of UDOIT to fix secure-by-default cookies in Chrome for cross-site cookies | |
// Place in config/settings.php directly under define('UDOIT_VERSION',.... | |
$lifetime = 0; | |
$path = '/'; | |
$domain = null; | |
$secure = true; | |
$httponly = false; | |
if (PHP_VERSION_ID < 70300) { | |
session_set_cookie_params($lifetime, "$path; samesite=None", $domain, $secure, $httponly); | |
} else { | |
session_set_cookie_params([ | |
'lifetime' => $lifetime, | |
'path' => $path, | |
'domain' => $domain, | |
'samesite' => 'None', | |
'secure' => $secure, | |
'httponly' => $httponly, | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment