Harden JsonMapper on login JSON handling

This commit is contained in:
Dylan K. Taylor
2024-02-23 14:10:02 +00:00
parent e06b042cd0
commit 6872661fd0
4 changed files with 19 additions and 16 deletions

View File

@ -135,6 +135,7 @@ class ProcessLoginTask extends AsyncTask{
$mapper = new \JsonMapper();
$mapper->bExceptionOnMissingData = true;
$mapper->bExceptionOnUndefinedProperty = true;
$mapper->bStrictObjectTypeChecking = true;
$mapper->bEnforceMapType = false;
try{
@ -181,6 +182,7 @@ class ProcessLoginTask extends AsyncTask{
$mapper = new \JsonMapper();
$mapper->bExceptionOnUndefinedProperty = false; //we only care about the properties we're using in this case
$mapper->bExceptionOnMissingData = true;
$mapper->bStrictObjectTypeChecking = true;
$mapper->bEnforceMapType = false;
$mapper->bRemoveUndefinedAttributes = true;
try{