@fedify/fedify 0.9.0-dev.183 → 0.9.0-dev.184
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of @fedify/fedify might be problematic. Click here for more details.
- package/CHANGES.md +4 -0
- package/esm/sig/http.js +1 -1
- package/package.json +1 -1
package/CHANGES.md
CHANGED
@@ -55,6 +55,10 @@ To be released.
|
|
55
55
|
- Deprecated `VerifyOptions` interface. Use `VerifyRequestOptions`
|
56
56
|
instead.
|
57
57
|
|
58
|
+
- When signing an HTTP request, the `algorithm` parameter is now added to
|
59
|
+
the `Signature` header. This change improves the compatibility with
|
60
|
+
Misskey and other implementations that require the `algorithm` parameter.
|
61
|
+
|
58
62
|
- Added more log messages using the [LogTape] library. Currently the below
|
59
63
|
logger categories are used:
|
60
64
|
|
package/esm/sig/http.js
CHANGED
@@ -41,7 +41,7 @@ export async function signRequest(request, privateKey, keyId) {
|
|
41
41
|
.map(([name, value]) => `${name}: ${value.trim()}`).join("\n");
|
42
42
|
// TODO: support other than RSASSA-PKCS1-v1_5:
|
43
43
|
const signature = await dntShim.crypto.subtle.sign("RSASSA-PKCS1-v1_5", privateKey, new TextEncoder().encode(message));
|
44
|
-
const sigHeader = `keyId="${keyId.href}",headers="${headerNames.join(" ")}",signature="${encodeBase64(signature)}"`;
|
44
|
+
const sigHeader = `keyId="${keyId.href}",algorithm="rsa-sha256",headers="${headerNames.join(" ")}",signature="${encodeBase64(signature)}"`;
|
45
45
|
headers.set("Signature", sigHeader);
|
46
46
|
return new Request(request, {
|
47
47
|
headers,
|