Made message signing in Cryptography use SHA512 as the message content for... #1

Closed
netkas wants to merge 421 commits from master into dev
Showing only changes of commit 481ea884f2 - Show all commits

View file

@ -51,11 +51,16 @@
try 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 // Resolve the peer, this would throw a StandardException if something goes wrong
Socialbox::resolvePeer($address); Socialbox::resolvePeer($address);
// Check if the contact already exists // Check if the contact already exists
$peer = $request->getPeer();
if(ContactManager::isContact($peer, $address)) if(ContactManager::isContact($peer, $address))
{ {
return $rpcRequest->produceError(StandardError::FORBIDDEN, 'Contact already exists'); return $rpcRequest->produceError(StandardError::FORBIDDEN, 'Contact already exists');