Refactor ContactManager to add UUID validation for peer UUID input
https://github.com/nosial/Socialbox-PHP/issues/34
This commit is contained in:
parent
b29f3ed1e2
commit
1c48fcd35e
1 changed files with 5 additions and 0 deletions
|
@ -330,6 +330,11 @@
|
|||
throw new InvalidArgumentException('The limit cannot exceed a value of ' . Configuration::getPoliciesConfiguration()->getGetContactsLimit());
|
||||
}
|
||||
|
||||
if(!Validator::validateUuid($peerUuid))
|
||||
{
|
||||
throw new InvalidArgumentException('The given peer UUID is not a valid UUID V4');
|
||||
}
|
||||
|
||||
$contacts = [];
|
||||
|
||||
try
|
||||
|
|
Loading…
Add table
Reference in a new issue