diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/Zend/Session.php | 4 | ||||
-rw-r--r-- | libs/upgradephp/upgrade.php | 19 |
2 files changed, 18 insertions, 5 deletions
diff --git a/libs/Zend/Session.php b/libs/Zend/Session.php index 793f76b8ed..3f21dcd9e6 100644 --- a/libs/Zend/Session.php +++ b/libs/Zend/Session.php @@ -341,7 +341,7 @@ class Zend_Session extends Zend_Session_Abstract } if (stripos($cookieHeader, 'SameSite') === false) { - $cookieHeader .= '; SameSite=Lax'; + $cookieHeader .= '; SameSite=' . \Piwik\Session::getSameSiteCookieValue(); header($cookieHeader); } } @@ -798,7 +798,7 @@ class Zend_Session extends Zend_Session_Abstract $cookie_params['domain'], $cookie_params['secure'], false, - 'lax' + \Piwik\Session::getSameSiteCookieValue() ); } } diff --git a/libs/upgradephp/upgrade.php b/libs/upgradephp/upgrade.php index 29fa9752d9..3ac2b8ae8c 100644 --- a/libs/upgradephp/upgrade.php +++ b/libs/upgradephp/upgrade.php @@ -681,9 +681,22 @@ if (!function_exists('utf8_decode')) { * @param string $charset */ if(!function_exists('mb_strtolower')) { - function mb_strtolower($input, $charset) { - return strtolower($input); - } + function mb_strtolower($input, $charset = '') { + return strtolower($input); + } +} + +/** + * Use strlen if mb_strlen doesn't exist (i.e., php not compiled with --enable-mbstring) + * This is not a functional replacement for mb_strlen. + * + * @param string $input + * @param string $charset + */ +if(!function_exists('mb_strlen')) { + function mb_strlen($input, $charset = '') { + return strlen($input); + } } /** |