diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2021-07-10 23:14:57 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-10 23:14:57 +0900 |
| commit | 1772af9583806cbebc21b4d200a29b9834168421 (patch) | |
| tree | 82e3535dd20eeb8ce2012e4e051360cfc8971e1e /src/queue/processors/inbox.ts | |
| parent | Rich welcome content (#7588) (diff) | |
| download | sharkey-1772af9583806cbebc21b4d200a29b9834168421.tar.gz sharkey-1772af9583806cbebc21b4d200a29b9834168421.tar.bz2 sharkey-1772af9583806cbebc21b4d200a29b9834168421.zip | |
AP Actorの修正 (#7573)
* AP Actorの修正
* Add ActivityPub test
* Fix person
* Test
* ap test
* Revert "Test"
This reverts commit 3c493eff4e89f94fd33f25189ba3bc96ef4366b3.
* Test comment
* fix
* fix
* Update inbox
* indent
* nl
* indent
* TODO
* Fix inbox
* Update test
Diffstat (limited to 'src/queue/processors/inbox.ts')
| -rw-r--r-- | src/queue/processors/inbox.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/queue/processors/inbox.ts b/src/queue/processors/inbox.ts index 2ef19777f1..5922c4c560 100644 --- a/src/queue/processors/inbox.ts +++ b/src/queue/processors/inbox.ts @@ -65,6 +65,11 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => { return `skip: failed to resolve user`; } + // publicKey がなくても終了 + if (authUser.key == null) { + return `skip: failed to resolve user publicKey`; + } + // HTTP-Signatureの検証 const httpSignatureValidated = httpSignature.verifySignature(signature, authUser.key.keyPem); @@ -89,6 +94,10 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => { return `skip: LD-Signatureのユーザーが取得できませんでした`; } + if (authUser.key == null) { + return `skip: LD-SignatureのユーザーはpublicKeyを持っていませんでした`; + } + // LD-Signature検証 const ldSignature = new LdSignature(); const verified = await ldSignature.verifyRsaSignature2017(activity, authUser.key.keyPem).catch(() => false); |