Made message signing in Cryptography use SHA512 as the message content for... #1
2 changed files with 4 additions and 30 deletions
|
@ -50,27 +50,15 @@
|
|||
|
||||
// Remove the SET_PASSWORD flag
|
||||
SessionManager::removeFlags($request->getSessionUuid(), [SessionFlags::SET_PASSWORD]);
|
||||
|
||||
// Check & update the session flow
|
||||
SessionManager::updateFlow($request->getSession());
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
throw new StandardException('Failed to set password due to an internal exception', StandardError::INTERNAL_SERVER_ERROR, $e);
|
||||
}
|
||||
|
||||
// Check if all registration flags are removed
|
||||
if(SessionFlags::isComplete($request->getSession()->getFlags()))
|
||||
{
|
||||
// Set the session as authenticated
|
||||
try
|
||||
{
|
||||
SessionManager::setAuthenticated($request->getSessionUuid(), true);
|
||||
SessionManager::removeFlags($request->getSessionUuid(), [SessionFlags::REGISTRATION_REQUIRED, SessionFlags::AUTHENTICATION_REQUIRED]);
|
||||
}
|
||||
catch (DatabaseOperationException $e)
|
||||
{
|
||||
throw new StandardException('Failed to update session due to an internal exception', StandardError::INTERNAL_SERVER_ERROR, $e);
|
||||
}
|
||||
}
|
||||
|
||||
return $rpcRequest->produceResponse(true);
|
||||
}
|
||||
}
|
|
@ -47,6 +47,7 @@
|
|||
if($result)
|
||||
{
|
||||
SessionManager::removeFlags($request->getSessionUuid(), [SessionFlags::VER_IMAGE_CAPTCHA]);
|
||||
SessionManager::updateFlow($session);
|
||||
}
|
||||
}
|
||||
catch (DatabaseOperationException $e)
|
||||
|
@ -54,21 +55,6 @@
|
|||
throw new StandardException("There was an unexpected error while trying to answer the captcha", StandardError::INTERNAL_SERVER_ERROR, $e);
|
||||
}
|
||||
|
||||
// Check if all registration flags are removed
|
||||
if(SessionFlags::isComplete($request->getSession()->getFlags()))
|
||||
{
|
||||
// Set the session as authenticated
|
||||
try
|
||||
{
|
||||
SessionManager::setAuthenticated($request->getSessionUuid(), true);
|
||||
SessionManager::removeFlags($request->getSessionUuid(), [SessionFlags::REGISTRATION_REQUIRED, SessionFlags::AUTHENTICATION_REQUIRED]);
|
||||
}
|
||||
catch (DatabaseOperationException $e)
|
||||
{
|
||||
return $rpcRequest->produceError(StandardError::INTERNAL_SERVER_ERROR, $e);
|
||||
}
|
||||
}
|
||||
|
||||
return $rpcRequest->produceResponse($result);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue