From b0420e16fc0aa0f16c36666ee003b482dd02580f Mon Sep 17 00:00:00 2001 From: Filippo Giuliani <109159+filippogiuliani@users.noreply.github.com> Date: Mon, 23 Nov 2026 11:08:01 +0000 Subject: [PATCH] Service: "?Action=" is the same as "?Action" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A plugin part hook used as an OAuth/OIDC redirect URI ("https://mail.example.com/?MyCallback") gets the provider's answer as "?MyCallback&code=…&state=…", but some providers (Pocket ID, for one) rebuild the query and send "?MyCallback=&code=…". The first path then was "MyCallback=" and the hook was not found. A trailing "=" on the first part is now ignored. Co-Authored-By: Claude Opus 5.5 --- snappymail/v/0.0.0/app/libraries/RainLoop/Service.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Service.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Service.php index b86cdcd316..de16336abc 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Service.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Service.php @@ -83,6 +83,9 @@ private static function RunResult() : bool } $aPaths = \explode('/', $sQuery); + // "?Action=&code=…" is "?Action&code=…": some OpenID Connect providers rebuild a redirect URI + // that way, and the plugin's part hook was not found + $aPaths[0] = \rtrim($aPaths[0], '='); $sAdminPanelHost = \trim($oConfig->Get('admin_panel', 'host', '')); if (empty($sAdminPanelHost)) {