diff --git a/src/Socialbox/Classes/StandardMethods/Settings/SettingsDeleteInformationField.php b/src/Socialbox/Classes/StandardMethods/Settings/SettingsDeleteInformationField.php index f5f15b8..ec9897f 100644 --- a/src/Socialbox/Classes/StandardMethods/Settings/SettingsDeleteInformationField.php +++ b/src/Socialbox/Classes/StandardMethods/Settings/SettingsDeleteInformationField.php @@ -27,7 +27,9 @@ { throw new MissingRpcArgumentException('field'); } - $fieldName = InformationFieldName::tryFrom(strtoupper($rpcRequest->getParameter('field'))); + + $fieldName = InformationFieldName::tryFrom(strtoupper((string)$rpcRequest->getParameter('field'))); + if($fieldName === null) { throw new InvalidRpcArgumentException('field'); diff --git a/src/Socialbox/Managers/PeerInformationManager.php b/src/Socialbox/Managers/PeerInformationManager.php index 4db2c7c..1a98c70 100644 --- a/src/Socialbox/Managers/PeerInformationManager.php +++ b/src/Socialbox/Managers/PeerInformationManager.php @@ -323,6 +323,10 @@ { $peerUuid = $peerUuid->getUuid(); } + elseif(!Validator::validateUuid($peerUuid)) + { + throw new InvalidArgumentException('The given internal peer UUID is not a valid UUID V4'); + } try {