Fix #2277 potentially undefined session variable

This commit is contained in:
Kijin Sung 2024-01-20 13:27:59 +09:00
parent 07e252d2ac
commit c91e772781
2 changed files with 5 additions and 5 deletions

View file

@ -899,7 +899,7 @@ class MemberController extends Member
function procMemberModifyInfoBefore()
{
if($_SESSION['rechecked_password_step'] != 'INPUT_PASSWORD')
if (!isset($_SESSION['rechecked_password_step']) || $_SESSION['rechecked_password_step'] !== 'INPUT_PASSWORD')
{
throw new Rhymix\Framework\Exceptions\InvalidRequest;
}
@ -952,7 +952,7 @@ class MemberController extends Member
throw new Rhymix\Framework\Exceptions\MustLogin;
}
if($_SESSION['rechecked_password_step'] != 'INPUT_DATA')
if (!isset($_SESSION['rechecked_password_step']) || $_SESSION['rechecked_password_step'] !== 'INPUT_DATA')
{
throw new Rhymix\Framework\Exceptions\InvalidRequest;
}
@ -3502,7 +3502,7 @@ class MemberController extends Member
{
if(!Context::get('is_logged')) throw new Rhymix\Framework\Exceptions\MustLogin;
if($_SESSION['rechecked_password_step'] != 'INPUT_DATA')
if (!isset($_SESSION['rechecked_password_step']) || $_SESSION['rechecked_password_step'] !== 'INPUT_DATA')
{
throw new Rhymix\Framework\Exceptions\InvalidRequest;
}