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 da250d6189 - Show all commits

View file

@ -15,17 +15,21 @@
{ {
/** /**
* Executes the process of accepting the community guidelines.
*
* @inheritDoc * @inheritDoc
*/ */
public static function execute(ClientRequest $request, RpcRequest $rpcRequest): ?SerializableInterface public static function execute(ClientRequest $request, RpcRequest $rpcRequest): ?SerializableInterface
{ {
if(!$request->getSession()->flagExists(SessionFlags::VER_COMMUNITY_GUIDELINES))
{
return $rpcRequest->produceError(StandardError::FORBIDDEN, 'Community guidelines has already been accepted');
}
try try
{ {
// Remove the verification flag
SessionManager::removeFlags($request->getSessionUuid(), [SessionFlags::VER_COMMUNITY_GUIDELINES]);
// Check & update the session flow // Check & update the session flow
SessionManager::updateFlow($request->getSession()); SessionManager::updateFlow($request->getSession(), [SessionFlags::VER_COMMUNITY_GUIDELINES]);
} }
catch (DatabaseOperationException $e) catch (DatabaseOperationException $e)
{ {