update node-http-message-signatures
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
"@fastify/multipart": "8.1.0",
|
||||
"@fastify/static": "6.12.0",
|
||||
"@fastify/view": "8.2.0",
|
||||
"@misskey-dev/node-http-message-signatures": "0.0.0-alpha.7",
|
||||
"@misskey-dev/node-http-message-signatures": "0.0.0-alpha.10",
|
||||
"@misskey-dev/sharp-read-bmp": "1.2.0",
|
||||
"@misskey-dev/summaly": "5.0.3",
|
||||
"@nestjs/common": "10.3.3",
|
||||
|
@@ -101,7 +101,7 @@ export class ActivityPubServerService {
|
||||
|
||||
@bindThis
|
||||
private inbox(request: FastifyRequest, reply: FastifyReply) {
|
||||
let signature;
|
||||
let signature: ReturnType<typeof parseRequestSignature>;
|
||||
|
||||
const verifyDigest = verifyDigestHeader(request.raw, request.rawBody || '', true);
|
||||
if (!verifyDigest) {
|
||||
@@ -116,11 +116,6 @@ export class ActivityPubServerService {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!signature) {
|
||||
reply.code(401);
|
||||
return;
|
||||
}
|
||||
|
||||
if (signature.value.params.headers.indexOf('host') === -1
|
||||
|| request.headers.host !== this.config.host) {
|
||||
// Host not specified or not match.
|
||||
|
Reference in New Issue
Block a user