From 90756b49a1e2779bf45b4ae2a18e5ba338847fbc Mon Sep 17 00:00:00 2001 From: netkas Date: Fri, 7 Mar 2025 15:40:55 -0500 Subject: [PATCH] Add UUID validation in channelUuidExists method of EncryptionChannelManager --- src/Socialbox/Managers/EncryptionChannelManager.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Socialbox/Managers/EncryptionChannelManager.php b/src/Socialbox/Managers/EncryptionChannelManager.php index 31a3444..004f4ec 100644 --- a/src/Socialbox/Managers/EncryptionChannelManager.php +++ b/src/Socialbox/Managers/EncryptionChannelManager.php @@ -30,6 +30,11 @@ */ public static function channelUuidExists(string $channelUuid): bool { + if(!Validator::validateUuid($channelUuid)) + { + throw new InvalidArgumentException('Invalid channel UUID V4'); + } + try { $stmt = Database::getConnection()->prepare('SELECT COUNT(*) FROM encryption_channels WHERE uuid=:uuid');