diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/UserAuth.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/UserAuth.php index 0b2c3cc3a..7030da219 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/UserAuth.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/UserAuth.php @@ -83,12 +83,16 @@ trait UserAuth } } - $sDefDomain = \trim($this->Config()->Get('login', 'default_domain', '')); - if (!\str_contains($sEmail, '@') && \strlen($sDefDomain)) { - $this->Logger()->Write('Default domain "' . $sDefDomain . '" was used. (' . $sEmail . ' > ' . $sEmail . '@' . $sDefDomain . ')', - \LOG_INFO, 'LOGIN'); + if (!\str_contains($sEmail, '@')) { + $sDefDomain = \trim($this->Config()->Get('login', 'default_domain', '')); + if (\strlen($sDefDomain)) { + $this->Logger()->Write('Default domain "' . $sDefDomain . '" was used. (' . $sEmail . ' > ' . $sEmail . '@' . $sDefDomain . ')', + \LOG_INFO, 'LOGIN'); - $sEmail .= '@' . $sDefDomain; + $sEmail .= '@' . $sDefDomain; + } else { + $this->Logger()->Write('Default domain not configured.', \LOG_INFO, 'LOGIN'); + } } } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/ServiceActions.php b/snappymail/v/0.0.0/app/libraries/RainLoop/ServiceActions.php index 94911fa17..a8965939e 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/ServiceActions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/ServiceActions.php @@ -836,14 +836,17 @@ class ServiceActions { \header('Content-Type: application/javascript; charset=utf-8'); $this->oHttp->ServerNoCache(); + try { + $sResult = 'rl.initData(' + . Utils::jsonEncode($this->oActions->AppData($bAdmin)) + . ');'; - $sResult = 'rl.initData(' - .Utils::jsonEncode($this->oActions->AppData($bAdmin)) - .');'; + $this->Logger()->Write($sResult, \LOG_INFO, 'APPDATA'); - $this->Logger()->Write($sResult, \LOG_INFO, 'APPDATA'); - - return $sResult; + return $sResult; + } catch (\Throwable $e) { + return 'alert(' . \json_encode('ERROR: ' . $e->getMessage()) . ');'; + } } public function compileTemplates(bool $bAdmin = false) : string diff --git a/snappymail/v/0.0.0/app/templates/Views/User/MailMessageView.html b/snappymail/v/0.0.0/app/templates/Views/User/MailMessageView.html index 022f7d160..3d446091f 100644 --- a/snappymail/v/0.0.0/app/templates/Views/User/MailMessageView.html +++ b/snappymail/v/0.0.0/app/templates/Views/User/MailMessageView.html @@ -196,7 +196,7 @@ :
- + 🏷
  • diff --git a/snappymail/v/0.0.0/setup.php b/snappymail/v/0.0.0/setup.php index b80ca7d18..725da827f 100644 --- a/snappymail/v/0.0.0/setup.php +++ b/snappymail/v/0.0.0/setup.php @@ -39,6 +39,8 @@ if (defined('APP_VERSION')) 'json' => function_exists('json_decode'), 'libxml' => function_exists('libxml_use_internal_errors'), 'dom' => class_exists('DOMDocument') + // https://github.com/the-djmaze/snappymail/issues/392 +// 'phar' => class_exists('PharData') ); if (in_array(false, $aRequirements))