@fedify/fedify 1.3.4 → 1.3.5
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 +14 -0
- package/esm/deno.js +1 -1
- package/esm/federation/middleware.js +4 -0
- package/esm/vocab/lookup.js +3 -0
- package/esm/vocab/vocab.js +173 -173
- package/esm/webfinger/lookup.js +13 -2
- package/package.json +1 -1
- package/types/federation/middleware.d.ts +1 -0
- package/types/federation/middleware.d.ts.map +1 -1
- package/types/vocab/lookup.d.ts.map +1 -1
package/CHANGES.md
CHANGED
@@ -3,6 +3,20 @@
|
|
3
3
|
Fedify changelog
|
4
4
|
================
|
5
5
|
|
6
|
+
Version 1.3.5
|
7
|
+
-------------
|
8
|
+
|
9
|
+
Released on January 21, 2025.
|
10
|
+
|
11
|
+
- Fixed a bug where `CreateFederationOptions.allowPrivateAddress` option had
|
12
|
+
been ignored by the `Context.lookupObject()` method when it had taken
|
13
|
+
a fediverse handle.
|
14
|
+
|
15
|
+
- The `lookupWebFinger()` function became to silently return `null` when
|
16
|
+
it fails to fetch the WebFinger document due to accessing a private network
|
17
|
+
address, instead of throwing a `UrlError`.
|
18
|
+
|
19
|
+
|
6
20
|
Version 1.3.4
|
7
21
|
-------------
|
8
22
|
|
package/esm/deno.js
CHANGED
@@ -58,6 +58,7 @@ export class FederationImpl {
|
|
58
58
|
documentLoader;
|
59
59
|
contextLoader;
|
60
60
|
authenticatedDocumentLoaderFactory;
|
61
|
+
allowPrivateAddress;
|
61
62
|
userAgent;
|
62
63
|
onOutboxError;
|
63
64
|
signatureTimeWindow;
|
@@ -112,6 +113,7 @@ export class FederationImpl {
|
|
112
113
|
}
|
113
114
|
}
|
114
115
|
const { allowPrivateAddress, userAgent } = options;
|
116
|
+
this.allowPrivateAddress = allowPrivateAddress ?? false;
|
115
117
|
this.documentLoader = options.documentLoader ?? kvCache({
|
116
118
|
loader: getDocumentLoader({ allowPrivateAddress, userAgent }),
|
117
119
|
kv: options.kv,
|
@@ -1818,6 +1820,8 @@ export class ContextImpl {
|
|
1818
1820
|
contextLoader: options.contextLoader ?? this.contextLoader,
|
1819
1821
|
userAgent: options.userAgent ?? this.federation.userAgent,
|
1820
1822
|
tracerProvider: options.tracerProvider ?? this.tracerProvider,
|
1823
|
+
// @ts-ignore: `allowPrivateAddress` is not in the type definition.
|
1824
|
+
allowPrivateAddress: this.federation.allowPrivateAddress,
|
1821
1825
|
});
|
1822
1826
|
}
|
1823
1827
|
traverseCollection(collection, options = {}) {
|
package/esm/vocab/lookup.js
CHANGED
@@ -95,6 +95,9 @@ async function lookupObjectInternal(identifier, options = {}) {
|
|
95
95
|
const jrd = await lookupWebFinger(identifier, {
|
96
96
|
userAgent: options.userAgent,
|
97
97
|
tracerProvider: options.tracerProvider,
|
98
|
+
// @ts-ignore: `allowPrivateAddress` is not in the type definition.
|
99
|
+
allowPrivateAddress: "allowPrivateAddress" in options &&
|
100
|
+
options.allowPrivateAddress,
|
98
101
|
});
|
99
102
|
if (jrd?.links == null)
|
100
103
|
return null;
|