mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-25 07:16:21 +08:00
Prevent undefined $_POST['Output']
This commit is contained in:
parent
ef6b95722d
commit
5e9c8eb39e
2 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ class LoginExternalSsoPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
REQUIRED = '2.21.0',
|
||||
CATEGORY = 'Login',
|
||||
LICENSE = 'MIT',
|
||||
DESCRIPTION = '';
|
||||
DESCRIPTION = 'More secure version of Login External with an SSO key';
|
||||
|
||||
public function Init() : void
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ class LoginExternalSsoPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
$sPassword = $_POST['Password'];
|
||||
if ($sEmail && $sPassword && $sKey && $_POST['SsoKey'] == $sKey) {
|
||||
$sResult = \RainLoop\Api::CreateUserSsoHash($sEmail, $sPassword);
|
||||
if ('json' == \strtolower($_POST['Output'] ?? 'Plain')) {
|
||||
if ('json' === \strtolower($_POST['Output'] ?? '')) {
|
||||
\header('Content-Type: application/json; charset=utf-8');
|
||||
echo \json_encode(array(
|
||||
'Action' => 'ExternalSso',
|
||||
|
|
|
@ -44,7 +44,7 @@ class LoginExternalPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
$oLogger && $oLogger->WriteException($oException);
|
||||
}
|
||||
|
||||
if ('json' === \strtolower($_POST['Output'])) {
|
||||
if ('json' === \strtolower($_POST['Output'] ?? '')) {
|
||||
\header('Content-Type: application/json; charset=utf-8');
|
||||
$aResult = array(
|
||||
'Action' => 'ExternalLogin',
|
||||
|
|
Loading…
Reference in a new issue