mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-24 06:55:12 +00:00
fix: primitives 9, 10 & 11: http signature validation doesn't enforce required headers or specify auth header name
This commit is contained in:
parent
174dfb83d0
commit
9ab25ede28
1 changed files with 2 additions and 2 deletions
|
@ -152,7 +152,7 @@ export class ActivityPubServerService {
|
||||||
let signature;
|
let signature;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
signature = httpSignature.parseRequest(request.raw, { 'headers': [] });
|
signature = httpSignature.parseRequest(request.raw, { 'headers': ['(request-target)', 'host', 'date'], authorizationHeaderName: 'signature' });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// not signed, or malformed signature: refuse
|
// not signed, or malformed signature: refuse
|
||||||
this.authlogger.warn(`${request.id} ${request.url} not signed, or malformed signature: refuse`);
|
this.authlogger.warn(`${request.id} ${request.url} not signed, or malformed signature: refuse`);
|
||||||
|
@ -229,7 +229,7 @@ export class ActivityPubServerService {
|
||||||
let signature;
|
let signature;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
signature = httpSignature.parseRequest(request.raw, { 'headers': [] });
|
signature = httpSignature.parseRequest(request.raw, { 'headers': ['(request-target)', 'digest', 'host', 'date'], authorizationHeaderName: 'signature' });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
reply.code(401);
|
reply.code(401);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue