Skip to content

Commit

Permalink
Resolve #1645
Browse files Browse the repository at this point in the history
  • Loading branch information
the-djmaze committed Aug 12, 2024
1 parent 17c4f87 commit e22414d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 8 additions & 4 deletions plugins/login-o365/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -45,8 +45,12 @@ public function Init() : void
$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',
Expand Down
6 changes: 0 additions & 6 deletions snappymail/v/0.0.0/app/libraries/RainLoop/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ private static function RunResult() : bool
}

$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);
Expand Down

0 comments on commit e22414d

Please sign in to comment.