Refactor ContactManager to add UUID validation for peer UUID input

https://github.com/nosial/Socialbox-PHP/issues/34
This commit is contained in:
netkas 2025-03-11 19:15:44 -04:00
parent b29f3ed1e2
commit 1c48fcd35e
Signed by: netkas
GPG key ID: 4D8629441B76E4CC

View file

@ -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