From c5d0e185c3bc18aa7e333953574bfd95283dcee6 Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 11 Mar 2025 14:57:18 -0400 Subject: [PATCH] Refactor EncryptionGetChannel to remove UUID validation and cast channel_uuid to string https://github.com/nosial/Socialbox-PHP/issues/22 --- .../EncryptionChannel/EncryptionGetChannel.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Socialbox/Classes/StandardMethods/EncryptionChannel/EncryptionGetChannel.php b/src/Socialbox/Classes/StandardMethods/EncryptionChannel/EncryptionGetChannel.php index ccae0eb..c27f37a 100644 --- a/src/Socialbox/Classes/StandardMethods/EncryptionChannel/EncryptionGetChannel.php +++ b/src/Socialbox/Classes/StandardMethods/EncryptionChannel/EncryptionGetChannel.php @@ -26,15 +26,11 @@ { throw new MissingRpcArgumentException('channel_uuid'); } - elseif(!Validator::validateUuid($rpcRequest->getParameter('channel_uuid'))) - { - throw new InvalidRpcArgumentException('channel_uuid', 'The given channel uuid is not a valid UUID V4'); - } try { $requestingPeer = $request->getPeer(); - $encryptionChannel = EncryptionChannelManager::getChannel($rpcRequest->getParameter('channel_uuid')); + $encryptionChannel = EncryptionChannelManager::getChannel((string)$rpcRequest->getParameter('channel_uuid')); } catch(DatabaseOperationException $e) {