@fedify/fedify 1.5.0-dev.667 → 1.5.0-dev.672
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +4 -0
- package/esm/deno.js +1 -1
- package/esm/sig/key.js +8 -0
- package/esm/vocab/vocab.js +176 -176
- package/package.json +1 -1
- package/types/sig/key.d.ts.map +1 -1
package/CHANGES.md
CHANGED
@@ -16,6 +16,9 @@ To be released.
|
|
16
16
|
- Added `importPkcs1()` function.
|
17
17
|
- Added `importPem()` function.
|
18
18
|
|
19
|
+
- Fedify became to choose the public key of the actor if `keyId` has no
|
20
|
+
fragment and the actor has only one public key. [[#211]]
|
21
|
+
|
19
22
|
- Fixed a bug of the `fedify inbox` command where it had failed to render
|
20
23
|
the web interface when the `fedify` command was installed using
|
21
24
|
`deno install` command from JSR.
|
@@ -27,6 +30,7 @@ To be released.
|
|
27
30
|
- You can easily copy the fediverse handle of the ephemeral actor.
|
28
31
|
|
29
32
|
[#209]: https://github.com/fedify-dev/fedify/issues/209
|
33
|
+
[#211]: https://github.com/fedify-dev/fedify/issues/211
|
30
34
|
|
31
35
|
|
32
36
|
Version 1.4.2
|
package/esm/deno.js
CHANGED
package/esm/sig/key.js
CHANGED
@@ -208,12 +208,20 @@ cls, { documentLoader, contextLoader, keyCache, tracerProvider } = {}) {
|
|
208
208
|
contextLoader,
|
209
209
|
tracerProvider,
|
210
210
|
});
|
211
|
+
let length = 0;
|
212
|
+
let lastKey = null;
|
211
213
|
for await (const k of keys) {
|
214
|
+
length++;
|
215
|
+
lastKey = k;
|
212
216
|
if (k.id?.href === keyId) {
|
213
217
|
key = k;
|
214
218
|
break;
|
215
219
|
}
|
216
220
|
}
|
221
|
+
const keyIdUrl = new URL(keyId);
|
222
|
+
if (key == null && keyIdUrl.hash === "" && length === 1) {
|
223
|
+
key = lastKey;
|
224
|
+
}
|
217
225
|
if (key == null) {
|
218
226
|
logger.debug("Failed to verify; object {keyId} returned an {actorType}, " +
|
219
227
|
"but has no key matching {keyId}.", { keyId, actorType: object.constructor.name });
|