server: HTTP signature requires date header
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful

The default of the library used is to require either of the "date" or
"x-date" headers. It does not seem sensible to pass on this default.
It may be to fix federation with another software but that software
should be considered broken, and it does not seem reasonable to
potentially get an outdated signature just to fix federation with some
buggy software.
This commit is contained in:
Johann150 2023-04-13 11:04:35 +02:00
parent 95ecdeabff
commit 808ad2a505
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -28,7 +28,7 @@ function inbox(ctx: Router.RouterContext): void {
let signature;
try {
signature = httpSignature.parseRequest(ctx.req, { 'headers': [] });
signature = httpSignature.parseRequest(ctx.req);
} catch (e) {
ctx.status = 401;
return;