From 3d65d2c1488a28101ab7ecde56fae016b1336a71 Mon Sep 17 00:00:00 2001 From: the-djmaze <3752035+the-djmaze@users.noreply.github.com> Date: Mon, 2 Nov 2026 21:55:51 +0100 Subject: [PATCH] Bugfix login-http extension --- plugins/login-http/index.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/login-http/index.php b/plugins/login-http/index.php index 9b53c0cb5..cc8f7726c 100644 --- a/plugins/login-http/index.php +++ b/plugins/login-http/index.php @@ -18,22 +18,22 @@ class LoginHttpPlugin extends \RainLoop\Plugins\AbstractPlugin $this->addPartHook('ExternalHTTP', 'ServiceExternalHTTP'); } - public function ServiceExternalHTTP() : string + public function ServiceExternalHTTP(): bool { $oActions = \RainLoop\Api::Actions(); $oActions->Http()->ServerNoCache(); - $sUser=$_SERVER['PHP_AUTH_USER'] ?? ''; - $sPassword=$_SERVER['PHP_AUTH_PW'] ?? ''; + $sUser = $_SERVER['PHP_AUTH_USER'] ?? ''; + $sPassword = $_SERVER['PHP_AUTH_PW'] ?? ''; try { - $oAccount = $oActions->LoginProcess($sUser, new \SnappyMail\SensitiveString($sPassword)); - if ($oAccount) { - \MailSo\Base\Http::Location('./'); - return true; - } - } catch (\Throwable $e) { - // Log l'erreur si besoin - } - \MailSo\Base\Http::Location('./?ExternalHTTP'); + $oAccount = $oActions->LoginProcess($sUser, new \SnappyMail\SensitiveString($sPassword)); + if ($oAccount) { + \MailSo\Base\Http::Location('./'); + return true; + } + } catch (\Throwable $e) { + // Log l'erreur si besoin + } + \MailSo\Base\Http::Location('./?ExternalHTTP'); return true; } }