Made message signing in Cryptography use SHA512 as the message content for... #1
3 changed files with 17 additions and 3 deletions
|
@ -3,4 +3,19 @@
|
||||||
require 'ncc';
|
require 'ncc';
|
||||||
import('net.nosial.socialbox');
|
import('net.nosial.socialbox');
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
\Socialbox\Socialbox::handleRpc();
|
\Socialbox\Socialbox::handleRpc();
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
http_response_code(500);
|
||||||
|
|
||||||
|
if(\Socialbox\Classes\Configuration::getSecurityConfiguration()->isDisplayInternalExceptions())
|
||||||
|
{
|
||||||
|
print_r($e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
print('An internal error occurred');
|
||||||
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ class CaptchaManager
|
||||||
}
|
}
|
||||||
|
|
||||||
$answer = Utilities::randomString(6, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789');
|
$answer = Utilities::randomString(6, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789');
|
||||||
$current_time = (new DateTime())->setTimestamp(time());
|
$current_time = (new DateTime())->setTimestamp(time())->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
if(!self::captchaExists($peer_uuid))
|
if(!self::captchaExists($peer_uuid))
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
{
|
{
|
||||||
Logger::getLogger()->error('Failed to parse the client request', $e);
|
Logger::getLogger()->error('Failed to parse the client request', $e);
|
||||||
http_response_code($e->getCode());
|
http_response_code($e->getCode());
|
||||||
print($e->getMessage());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue