mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 03:53:09 +02:00
upd: change handling of renewkeyFailed
This commit is contained in:
parent
c76f0f1679
commit
33eab0d178
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue