mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 22:49:24 +09:00
update node-http-message-signatures
This commit is contained in:
parent
65fa25a208
commit
86c9f0b0fb
@ -79,7 +79,7 @@
|
|||||||
"@fastify/multipart": "8.1.0",
|
"@fastify/multipart": "8.1.0",
|
||||||
"@fastify/static": "6.12.0",
|
"@fastify/static": "6.12.0",
|
||||||
"@fastify/view": "8.2.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/sharp-read-bmp": "1.2.0",
|
||||||
"@misskey-dev/summaly": "5.0.3",
|
"@misskey-dev/summaly": "5.0.3",
|
||||||
"@nestjs/common": "10.3.3",
|
"@nestjs/common": "10.3.3",
|
||||||
|
@ -101,7 +101,7 @@ export class ActivityPubServerService {
|
|||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
private inbox(request: FastifyRequest, reply: FastifyReply) {
|
private inbox(request: FastifyRequest, reply: FastifyReply) {
|
||||||
let signature;
|
let signature: ReturnType<typeof parseRequestSignature>;
|
||||||
|
|
||||||
const verifyDigest = verifyDigestHeader(request.raw, request.rawBody || '', true);
|
const verifyDigest = verifyDigestHeader(request.raw, request.rawBody || '', true);
|
||||||
if (!verifyDigest) {
|
if (!verifyDigest) {
|
||||||
@ -116,11 +116,6 @@ export class ActivityPubServerService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!signature) {
|
|
||||||
reply.code(401);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (signature.value.params.headers.indexOf('host') === -1
|
if (signature.value.params.headers.indexOf('host') === -1
|
||||||
|| request.headers.host !== this.config.host) {
|
|| request.headers.host !== this.config.host) {
|
||||||
// Host not specified or not match.
|
// Host not specified or not match.
|
||||||
|
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@ -111,8 +111,8 @@ importers:
|
|||||||
specifier: 8.2.0
|
specifier: 8.2.0
|
||||||
version: 8.2.0
|
version: 8.2.0
|
||||||
'@misskey-dev/node-http-message-signatures':
|
'@misskey-dev/node-http-message-signatures':
|
||||||
specifier: 0.0.0-alpha.7
|
specifier: 0.0.0-alpha.10
|
||||||
version: 0.0.0-alpha.7
|
version: 0.0.0-alpha.10
|
||||||
'@misskey-dev/sharp-read-bmp':
|
'@misskey-dev/sharp-read-bmp':
|
||||||
specifier: 1.2.0
|
specifier: 1.2.0
|
||||||
version: 1.2.0
|
version: 1.2.0
|
||||||
@ -4750,8 +4750,8 @@ packages:
|
|||||||
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)
|
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@misskey-dev/node-http-message-signatures@0.0.0-alpha.7:
|
/@misskey-dev/node-http-message-signatures@0.0.0-alpha.10:
|
||||||
resolution: {integrity: sha512-iM1nZ3YT+G4AEhbUnsK7PqnMY9MjBP5JomQAgi2OyxDtZ/wBpgLP6MCVz3ElCqZ8NQS1f+c4E1m6/dSN8MtU9Q==}
|
resolution: {integrity: sha512-4weLJVBm06bx4fLJHL9YtKXQ8ofKSNDI4UAaoI0JkzbbU8pyJHK4LFGfERrpUX9C+WsvSwVFZAgAzOxFwJ7z2w==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@misskey-dev/sharp-read-bmp@1.2.0:
|
/@misskey-dev/sharp-read-bmp@1.2.0:
|
||||||
|
Loading…
Reference in New Issue
Block a user