diff --git a/plugins/demo-account/index.php b/plugins/demo-account/index.php index 0fdf8a6ef..993df2458 100644 --- a/plugins/demo-account/index.php +++ b/plugins/demo-account/index.php @@ -77,7 +77,7 @@ class DemoAccountPlugin extends \RainLoop\Plugins\AbstractPlugin } } - public function FilterSendMessage(&$oMessage) + public function FilterSendMessage($oMessage) { if ($oMessage && $this->isDemoAccount($this->Manager()->Actions()->GetAccount())) { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Utils.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Utils.php index 7b4b68bf1..ea7d88f3b 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Utils.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Utils.php @@ -81,7 +81,7 @@ class Utils public static function Fingerprint() : string { - return \md5(empty($_SERVER['HTTP_USER_AGENT']) ? 'RainLoopFingerprint' : $_SERVER['HTTP_USER_AGENT']); + return \md5($_SERVER['HTTP_USER_AGENT'] ?: 'RainLoopFingerprint'); } public static function GetShortToken() : string diff --git a/snappymail/v/0.0.0/include.php b/snappymail/v/0.0.0/include.php index 1a24c36ca..6671be999 100644 --- a/snappymail/v/0.0.0/include.php +++ b/snappymail/v/0.0.0/include.php @@ -15,7 +15,7 @@ } // PHP 8 - if (!\function_exists('str_contains')) { + if (!function_exists('str_contains')) { function str_contains(string $haystack, string $needle) : bool { return false !== \strpos($haystack, $needle); @@ -233,6 +233,10 @@ unset($sSalt, $sData, $sInstalled, $sPrivateDataFolderInternalName); } + if (!isset($_SERVER['HTTP_USER_AGENT'])) { + $_SERVER['HTTP_USER_AGENT'] = ''; + } + // See https://github.com/kjdev/php-ext-brotli if (!ini_get('zlib.output_compression') && !ini_get('brotli.output_compression')) { if (defined('USE_GZIP')) {