From e22414d90892eec3ee02c8519c328257f3fbae97 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 13 Aug 2024 01:14:15 +0200 Subject: [PATCH] Resolve #1645 --- plugins/login-o365/index.php | 12 ++++++++---- .../v/0.0.0/app/libraries/RainLoop/Service.php | 6 ------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/plugins/login-o365/index.php b/plugins/login-o365/index.php index 5bca32bc6..902c46d15 100644 --- a/plugins/login-o365/index.php +++ b/plugins/login-o365/index.php @@ -18,9 +18,9 @@ class LoginO365Plugin extends \RainLoop\Plugins\AbstractPlugin { const NAME = 'Office365/Outlook OAuth2', - VERSION = '0.1', - RELEASE = '2024-07-01', - REQUIRED = '2.36.5', + VERSION = '0.2', + RELEASE = '2024-08-13', + REQUIRED = '2.36.1', CATEGORY = 'Login', DESCRIPTION = 'Office365/Outlook IMAP, Sieve & SMTP login using RFC 7628 OAuth2'; @@ -45,8 +45,12 @@ class LoginO365Plugin extends \RainLoop\Plugins\AbstractPlugin $this->addHook('filter.http-paths', 'httpPaths'); } - public function httpPaths(array $aPaths) : void + public function httpPaths(array &$aPaths) : void { + if (!empty($_SERVER['PATH_INFO']) && \str_ends_with($_SERVER['PATH_INFO'], 'LoginO365')) { + $aPaths = ['LoginO365']; + } + if (!empty($aPaths[0]) && 'LoginO365' === $aPaths[0]) { $oConfig = \RainLoop\Api::Config(); $oConfig->Set('security', 'secfetch_allow', 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 71598ae7f..e46e2541c 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Service.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Service.php @@ -66,12 +66,6 @@ abstract class Service } $sQuery = \trim($_SERVER['QUERY_STRING'] ?? ''); -/* - https://github.com/the-djmaze/snappymail/commit/47d18cafa38dd526b4221c2a72d1529e4fa1d255#r144395031 - if (!empty($_SERVER['PATH_INFO'])) { - $sQuery = \ltrim($_SERVER['PATH_INFO'],'/') . '&' . $sQuery; - } -*/ $iPos = \strpos($sQuery, '&'); if (0 < $iPos) { $sQuery = \substr($sQuery, 0, $iPos);