upd: change handling of renewkeyFailed

This commit is contained in:
Mar0xy 2023-10-20 12:54:25 +02:00
parent c76f0f1679
commit 33eab0d178
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
1 changed files with 2 additions and 3 deletions

View File

@ -108,15 +108,14 @@ export class InboxProcessorService {
// また、signatureのsignerは、activity.actorと一致する必要がある // また、signatureのsignerは、activity.actorと一致する必要がある
if (!httpSignatureValidated || authUser.user.uri !== activity.actor) { if (!httpSignatureValidated || authUser.user.uri !== activity.actor) {
let renewKeyFailed = authUser.user.uri !== activity.actor ? true : false; let renewKeyFailed = true;
if (!httpSignatureValidated) { if (!httpSignatureValidated) {
authUser.key = await this.apDbResolverService.refetchPublicKeyForApId(authUser.user); authUser.key = await this.apDbResolverService.refetchPublicKeyForApId(authUser.user);
if (authUser.key != null) { if (authUser.key != null) {
httpSignatureValidated = httpSignature.verifySignature(signature, authUser.key.keyPem); httpSignatureValidated = httpSignature.verifySignature(signature, authUser.key.keyPem);
} else { renewKeyFailed = false;
renewKeyFailed = true;
} }
} }