mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-26 09:03:48 +08:00
Bugfix: undefined $_POST array key
This commit is contained in:
parent
07db91c7ce
commit
8e7569c8f3
2 changed files with 7 additions and 7 deletions
|
@ -23,11 +23,11 @@ class LoginExternalSsoPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
$oActions = \RainLoop\Api::Actions();
|
||||
$oActions->Http()->ServerNoCache();
|
||||
$sKey = $this->Config()->Get('plugin', 'key', '');
|
||||
$sEmail = $_POST['Email'];
|
||||
$sPassword = $_POST['Password'];
|
||||
if ($sEmail && $sPassword && $sKey && $_POST['SsoKey'] == $sKey) {
|
||||
$sEmail = isset($_POST['Email']) ? $_POST['Email'] : '';
|
||||
$sPassword = isset($_POST['Password']) ? $_POST['Password'] : '';
|
||||
if ($sEmail && $sPassword && $sKey && isset($_POST['SsoKey']) && $_POST['SsoKey'] == $sKey) {
|
||||
$sResult = \RainLoop\Api::CreateUserSsoHash($sEmail, $sPassword);
|
||||
if ('json' === \strtolower($_POST['Output'] ?? '')) {
|
||||
if (isset($_POST['Output']) && 'json' === \strtolower($_POST['Output'])) {
|
||||
\header('Content-Type: application/json; charset=utf-8');
|
||||
echo \json_encode(array(
|
||||
'Action' => 'ExternalSso',
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue