diff --git a/src/Socialbox/Classes/StandardMethods/Core/ResolveSignature.php b/src/Socialbox/Classes/StandardMethods/Core/ResolveSignature.php index 002d264..7a22d2d 100644 --- a/src/Socialbox/Classes/StandardMethods/Core/ResolveSignature.php +++ b/src/Socialbox/Classes/StandardMethods/Core/ResolveSignature.php @@ -35,10 +35,6 @@ { throw new MissingRpcArgumentException('signature_uuid'); } - elseif(!Validator::validateUuid($rpcRequest->getParameter('signature_uuid'))) - { - throw new InvalidRpcArgumentException('signature_uuid', 'Invalid UUID V4'); - } return $rpcRequest->produceResponse(Socialbox::resolvePeerSignature( $rpcRequest->getParameter('peer'), $rpcRequest->getParameter('signature_uuid') diff --git a/src/Socialbox/Socialbox.php b/src/Socialbox/Socialbox.php index 0c011b6..d073e30 100644 --- a/src/Socialbox/Socialbox.php +++ b/src/Socialbox/Socialbox.php @@ -27,6 +27,7 @@ use Socialbox\Exceptions\RequestException; use Socialbox\Exceptions\ResolutionException; use Socialbox\Exceptions\RpcException; + use Socialbox\Exceptions\Standard\InvalidRpcArgumentException; use Socialbox\Exceptions\Standard\StandardRpcException; use Socialbox\Managers\ContactManager; use Socialbox\Managers\ExternalSessionManager; @@ -910,6 +911,11 @@ throw new StandardRpcException('Cannot resolve signature for a host peer', StandardError::FORBIDDEN); } + if(!Validator::validateUuid($signatureUuid)) + { + throw new InvalidRpcArgumentException('The given signature UUID is not a valid UUID V4'); + } + // If the peer is registered within this server if($peerAddress->getDomain() === Configuration::getInstanceConfiguration()->getDomain()) {