Bugfix: undefined $_POST array key

This commit is contained in:
the-djmaze 2022-11-11 17:11:44 +01:00
parent 07db91c7ce
commit 8e7569c8f3
2 changed files with 7 additions and 7 deletions

View file

@ -26,8 +26,8 @@ class LoginExternalPlugin extends \RainLoop\Plugins\AbstractPlugin
$oAccount = null;
$oException = null;
$sEmail = \trim($_POST['Email']);
$sPassword = $_POST['Password'];
$sEmail = isset($_POST['Email']) ? $_POST['Email'] : '';
$sPassword = isset($_POST['Password']) ? $_POST['Password'] : '';
try
{
@ -44,7 +44,7 @@ class LoginExternalPlugin extends \RainLoop\Plugins\AbstractPlugin
$oLogger && $oLogger->WriteException($oException);
}
if ('json' === \strtolower($_POST['Output'] ?? '')) {
if (isset($_POST['Output']) && 'json' === \strtolower($_POST['Output'])) {
\header('Content-Type: application/json; charset=utf-8');
$aResult = array(
'Action' => 'ExternalLogin',