Refactor EncryptionChannelSend and EncryptionChannelManager to remove UUID and checksum validation, and add timestamp range check
https://github.com/nosial/Socialbox-PHP/issues/18
This commit is contained in:
parent
4e79783617
commit
4f35485005
3 changed files with 32 additions and 8 deletions
|
@ -32,10 +32,6 @@
|
|||
{
|
||||
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
|
||||
{
|
||||
|
@ -102,10 +98,6 @@
|
|||
{
|
||||
throw new MissingRpcArgumentException('checksum');
|
||||
}
|
||||
elseif(!Cryptography::validateSha512($rpcRequest->getParameter('checksum')))
|
||||
{
|
||||
throw new InvalidRpcArgumentException('checksum', 'The given checksum is not a valid SHA-512 checksum');
|
||||
}
|
||||
|
||||
if(!$rpcRequest->containsParameter('data'))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue