ProcessLoginTask: fixed backport errors

This commit is contained in:
Dylan K. Taylor 2023-07-14 12:37:50 +01:00
parent 4e646d19a4
commit 2709dd359c
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -156,7 +156,7 @@ class ProcessLoginTask extends AsyncTask{
$signingKeyOpenSSL = JwtUtils::parseDerPublicKey($headerDerKey);
}catch(JwtException $e){
//TODO: we shouldn't be showing this internal information to the client
throw new VerifyLoginException("Invalid JWT public key: " . $e->getMessage(), null, 0, $e);
throw new VerifyLoginException("Invalid JWT public key: " . $e->getMessage(), 0, $e);
}
try{
if(!JwtUtils::verify($jwt, $signingKeyOpenSSL)){
@ -200,7 +200,7 @@ class ProcessLoginTask extends AsyncTask{
//verify key format and parameters
JwtUtils::parseDerPublicKey($identityPublicKey);
}catch(JwtException $e){
throw new VerifyLoginException("Invalid identityPublicKey: " . $e->getMessage(), null, 0, $e);
throw new VerifyLoginException("Invalid identityPublicKey: " . $e->getMessage(), 0, $e);
}
$currentPublicKey = $identityPublicKey; //if there are further links, the next link should be signed with this
}