Add UUID validation in channelUuidExists method of EncryptionChannelManager
This commit is contained in:
parent
78c5a22c15
commit
90756b49a1
1 changed files with 5 additions and 0 deletions
|
@ -30,6 +30,11 @@
|
||||||
*/
|
*/
|
||||||
public static function channelUuidExists(string $channelUuid): bool
|
public static function channelUuidExists(string $channelUuid): bool
|
||||||
{
|
{
|
||||||
|
if(!Validator::validateUuid($channelUuid))
|
||||||
|
{
|
||||||
|
throw new InvalidArgumentException('Invalid channel UUID V4');
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$stmt = Database::getConnection()->prepare('SELECT COUNT(*) FROM encryption_channels WHERE uuid=:uuid');
|
$stmt = Database::getConnection()->prepare('SELECT COUNT(*) FROM encryption_channels WHERE uuid=:uuid');
|
||||||
|
|
Loading…
Add table
Reference in a new issue