Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This patch allows UDOIT to be used with Chrome's new secure-by-default cookie policy
// 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 {
'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