mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
Resolve #1645
This commit is contained in:
parent
17c4f87fa5
commit
e22414d908
|
@ -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',
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue