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

Closed
netkas wants to merge 421 commits from master into dev
2 changed files with 4 additions and 5 deletions
Showing only changes of commit 8e1f6351e2 - Show all commits

View file

@ -17,7 +17,7 @@ use Socialbox\Objects\ClientRequest;
use Socialbox\Objects\RpcRequest; use Socialbox\Objects\RpcRequest;
use Socialbox\Objects\Standard\ImageCaptcha; use Socialbox\Objects\Standard\ImageCaptcha;
class GetCaptcha extends Method class VerificationGetCaptcha extends Method
{ {
/** /**
* @inheritDoc * @inheritDoc
@ -74,7 +74,6 @@ class GetCaptcha extends Method
} }
// Build the captcha // Build the captcha
Logger::getLogger()->debug('Building captcha for peer ' . $peer->getUuid());
return $rpcRequest->produceResponse(new ImageCaptcha([ return $rpcRequest->produceResponse(new ImageCaptcha([
'expires' => $captchaRecord->getExpires()->getTimestamp(), 'expires' => $captchaRecord->getExpires()->getTimestamp(),
'image' => (new CaptchaBuilder($answer))->build()->inline()] // Returns HTML base64 encoded image of the captcha 'image' => (new CaptchaBuilder($answer))->build()->inline()] // Returns HTML base64 encoded image of the captcha

View file

@ -3,7 +3,7 @@
namespace Socialbox\Enums; namespace Socialbox\Enums;
use Socialbox\Classes\StandardMethods\CreateSession; use Socialbox\Classes\StandardMethods\CreateSession;
use Socialbox\Classes\StandardMethods\GetCaptcha; use Socialbox\Classes\StandardMethods\VerificationGetCaptcha;
use Socialbox\Classes\StandardMethods\GetMe; use Socialbox\Classes\StandardMethods\GetMe;
use Socialbox\Classes\StandardMethods\Ping; use Socialbox\Classes\StandardMethods\Ping;
use Socialbox\Classes\StandardMethods\Register; use Socialbox\Classes\StandardMethods\Register;
@ -18,7 +18,7 @@ enum StandardMethods : string
case CREATE_SESSION = 'createSession'; case CREATE_SESSION = 'createSession';
case REGISTER = 'register'; case REGISTER = 'register';
case GET_ME = 'getMe'; case GET_ME = 'getMe';
case GET_CAPTCHA = 'getCaptcha'; case VERIFICATION_GET_CAPTCHA = 'verificationGetCaptcha';
/** /**
* @param ClientRequest $request * @param ClientRequest $request
@ -34,7 +34,7 @@ enum StandardMethods : string
self::CREATE_SESSION => CreateSession::execute($request, $rpcRequest), self::CREATE_SESSION => CreateSession::execute($request, $rpcRequest),
self::REGISTER => Register::execute($request, $rpcRequest), self::REGISTER => Register::execute($request, $rpcRequest),
self::GET_ME => GetMe::execute($request, $rpcRequest), self::GET_ME => GetMe::execute($request, $rpcRequest),
self::GET_CAPTCHA => GetCaptcha::execute($request, $rpcRequest), self::VERIFICATION_GET_CAPTCHA => VerificationGetCaptcha::execute($request, $rpcRequest),
}; };
} }
} }