Unverified Commit 5e5b73cc authored by Hong Minhee's avatar Hong Minhee
Browse files

Add algorithm param to Signature header

parent c5893c1a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -55,6 +55,10 @@ To be released.
     -  Deprecated `VerifyOptions` interface.  Use `VerifyRequestOptions`
        instead.

 -  When signing an HTTP request, the `algorithm` parameter is now added to
    the `Signature` header.  This change improves the compatibility with
    Misskey and other implementations that require the `algorithm` parameter.

 -  Added more log messages using the [LogTape] library.  Currently the below
    logger categories are used:

+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ export const command = new Command()
          { handle: "i" },
          actor,
          new Follow({
            id: new URL(`#follows/${actor.id?.href}`, fedCtx.getActorUri("i")),
            actor: fedCtx.getActorUri("i"),
            object: actor.id,
          }),
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ export async function signRequest(
    privateKey,
    new TextEncoder().encode(message),
  );
  const sigHeader = `keyId="${keyId.href}",headers="${
  const sigHeader = `keyId="${keyId.href}",algorithm="rsa-sha256",headers="${
    headerNames.join(" ")
  }",signature="${encodeBase64(signature)}"`;
  headers.set("Signature", sigHeader);