Made message signing in Cryptography use SHA512 as the message content for... #1
1 changed files with 6 additions and 1 deletions
|
@ -51,11 +51,16 @@
|
|||
|
||||
try
|
||||
{
|
||||
$peer = $request->getPeer();
|
||||
if($peer->getAddress() == $address)
|
||||
{
|
||||
return $rpcRequest->produceError(StandardError::FORBIDDEN, 'Cannot add self as contact');
|
||||
}
|
||||
|
||||
// Resolve the peer, this would throw a StandardException if something goes wrong
|
||||
Socialbox::resolvePeer($address);
|
||||
|
||||
// Check if the contact already exists
|
||||
$peer = $request->getPeer();
|
||||
if(ContactManager::isContact($peer, $address))
|
||||
{
|
||||
return $rpcRequest->produceError(StandardError::FORBIDDEN, 'Contact already exists');
|
||||
|
|
Loading…
Add table
Reference in a new issue