mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03: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',
|
REQUIRED = '2.21.0',
|
||||||
CATEGORY = 'Login',
|
CATEGORY = 'Login',
|
||||||
LICENSE = 'MIT',
|
LICENSE = 'MIT',
|
||||||
DESCRIPTION = '';
|
DESCRIPTION = 'More secure version of Login External with an SSO key';
|
||||||
|
|
||||||
public function Init() : void
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
@ -27,7 +27,7 @@ class LoginExternalSsoPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
$sPassword = $_POST['Password'];
|
$sPassword = $_POST['Password'];
|
||||||
if ($sEmail && $sPassword && $sKey && $_POST['SsoKey'] == $sKey) {
|
if ($sEmail && $sPassword && $sKey && $_POST['SsoKey'] == $sKey) {
|
||||||
$sResult = \RainLoop\Api::CreateUserSsoHash($sEmail, $sPassword);
|
$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');
|
\header('Content-Type: application/json; charset=utf-8');
|
||||||
echo \json_encode(array(
|
echo \json_encode(array(
|
||||||
'Action' => 'ExternalSso',
|
'Action' => 'ExternalSso',
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class LoginExternalPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
$oLogger && $oLogger->WriteException($oException);
|
$oLogger && $oLogger->WriteException($oException);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('json' === \strtolower($_POST['Output'])) {
|
if ('json' === \strtolower($_POST['Output'] ?? '')) {
|
||||||
\header('Content-Type: application/json; charset=utf-8');
|
\header('Content-Type: application/json; charset=utf-8');
|
||||||
$aResult = array(
|
$aResult = array(
|
||||||
'Action' => 'ExternalLogin',
|
'Action' => 'ExternalLogin',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue