Handle missing session in DHE exchange requests
This commit is contained in:
parent
2c83604057
commit
ec32978050
1 changed files with 7 additions and 1 deletions
|
@ -286,8 +286,14 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the session is awaiting a DHE exchange, forbidden if not
|
|
||||||
$session = $clientRequest->getSession();
|
$session = $clientRequest->getSession();
|
||||||
|
if($session === null)
|
||||||
|
{
|
||||||
|
self::returnError(404, StandardError::SESSION_NOT_FOUND, 'Session not found');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the session is awaiting a DHE exchange, forbidden if not
|
||||||
if($session->getState() !== SessionState::AWAITING_DHE)
|
if($session->getState() !== SessionState::AWAITING_DHE)
|
||||||
{
|
{
|
||||||
self::returnError(403, StandardError::FORBIDDEN, 'Bad request: The session is not awaiting a DHE exchange');
|
self::returnError(403, StandardError::FORBIDDEN, 'Bad request: The session is not awaiting a DHE exchange');
|
||||||
|
|
Loading…
Add table
Reference in a new issue