@fedify/fedify 1.3.3 → 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 +108 -0
- package/LICENSE +1 -1
- package/esm/deno.js +1 -1
- package/esm/federation/middleware.js +4 -0
- package/esm/runtime/url.js +7 -1
- package/esm/vocab/lookup.js +3 -0
- package/esm/vocab/vocab.js +173 -173
- package/esm/webfinger/lookup.js +32 -1
- package/package.json +1 -1
- package/types/federation/middleware.d.ts +1 -0
- package/types/federation/middleware.d.ts.map +1 -1
- package/types/runtime/url.d.ts.map +1 -1
- package/types/vocab/lookup.d.ts.map +1 -1
- package/types/webfinger/lookup.d.ts.map +1 -1
package/CHANGES.md
CHANGED
@@ -3,6 +3,43 @@
|
|
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
|
+
|
20
|
+
Version 1.3.4
|
21
|
+
-------------
|
22
|
+
|
23
|
+
Released on January 21, 2025.
|
24
|
+
|
25
|
+
- Fixed several security vulnerabilities of the `lookupWebFinger()` function.
|
26
|
+
[[CVE-2025-23221]]
|
27
|
+
|
28
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
29
|
+
had followed the infinite number of redirects, which could lead to
|
30
|
+
a denial of service attack. Now it follows up to 5 redirects.
|
31
|
+
|
32
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
33
|
+
had followed the redirects to other than the HTTP/HTTPS schemes, which
|
34
|
+
could lead to a security breach. Now it follows only the same scheme
|
35
|
+
as the original request.
|
36
|
+
|
37
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
38
|
+
had followed the redirects to the private network addresses, which
|
39
|
+
could lead to a SSRF attack. Now it follows only the public network
|
40
|
+
addresses.
|
41
|
+
|
42
|
+
|
6
43
|
Version 1.3.3
|
7
44
|
-------------
|
8
45
|
|
@@ -147,6 +184,29 @@ Released on November 30, 2024.
|
|
147
184
|
[#193]: https://github.com/dahlia/fedify/issues/193
|
148
185
|
|
149
186
|
|
187
|
+
Version 1.2.11
|
188
|
+
--------------
|
189
|
+
|
190
|
+
Released on January 21, 2025.
|
191
|
+
|
192
|
+
- Fixed several security vulnerabilities of the `lookupWebFinger()` function.
|
193
|
+
[[CVE-2025-23221]]
|
194
|
+
|
195
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
196
|
+
had followed the infinite number of redirects, which could lead to
|
197
|
+
a denial of service attack. Now it follows up to 5 redirects.
|
198
|
+
|
199
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
200
|
+
had followed the redirects to other than the HTTP/HTTPS schemes, which
|
201
|
+
could lead to a security breach. Now it follows only the same scheme
|
202
|
+
as the original request.
|
203
|
+
|
204
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
205
|
+
had followed the redirects to the private network addresses, which
|
206
|
+
could lead to a SSRF attack. Now it follows only the public network
|
207
|
+
addresses.
|
208
|
+
|
209
|
+
|
150
210
|
Version 1.2.10
|
151
211
|
--------------
|
152
212
|
|
@@ -371,6 +431,29 @@ Released on October 31, 2024.
|
|
371
431
|
[#118]: https://github.com/dahlia/fedify/issues/118
|
372
432
|
|
373
433
|
|
434
|
+
Version 1.1.11
|
435
|
+
--------------
|
436
|
+
|
437
|
+
Released on January 21, 2025.
|
438
|
+
|
439
|
+
- Fixed several security vulnerabilities of the `lookupWebFinger()` function.
|
440
|
+
[[CVE-2025-23221]]
|
441
|
+
|
442
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
443
|
+
had followed the infinite number of redirects, which could lead to
|
444
|
+
a denial of service attack. Now it follows up to 5 redirects.
|
445
|
+
|
446
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
447
|
+
had followed the redirects to other than the HTTP/HTTPS schemes, which
|
448
|
+
could lead to a security breach. Now it follows only the same scheme
|
449
|
+
as the original request.
|
450
|
+
|
451
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
452
|
+
had followed the redirects to the private network addresses, which
|
453
|
+
could lead to a SSRF attack. Now it follows only the public network
|
454
|
+
addresses.
|
455
|
+
|
456
|
+
|
374
457
|
Version 1.1.10
|
375
458
|
--------------
|
376
459
|
|
@@ -636,6 +719,31 @@ Released on October 20, 2024.
|
|
636
719
|
[#150]: https://github.com/dahlia/fedify/issues/150
|
637
720
|
|
638
721
|
|
722
|
+
Version 1.0.14
|
723
|
+
--------------
|
724
|
+
|
725
|
+
Released on January 21, 2025.
|
726
|
+
|
727
|
+
- Fixed several security vulnerabilities of the `lookupWebFinger()` function.
|
728
|
+
[[CVE-2025-23221]]
|
729
|
+
|
730
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
731
|
+
had followed the infinite number of redirects, which could lead to
|
732
|
+
a denial of service attack. Now it follows up to 5 redirects.
|
733
|
+
|
734
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
735
|
+
had followed the redirects to other than the HTTP/HTTPS schemes, which
|
736
|
+
could lead to a security breach. Now it follows only the same scheme
|
737
|
+
as the original request.
|
738
|
+
|
739
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
740
|
+
had followed the redirects to the private network addresses, which
|
741
|
+
could lead to a SSRF attack. Now it follows only the public network
|
742
|
+
addresses.
|
743
|
+
|
744
|
+
[CVE-2025-23221]: https://github.com/dahlia/fedify/security/advisories/GHSA-c59p-wq67-24wx
|
745
|
+
|
746
|
+
|
639
747
|
Version 1.0.13
|
640
748
|
--------------
|
641
749
|
|
package/LICENSE
CHANGED
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/runtime/url.js
CHANGED
@@ -38,7 +38,13 @@ export async function validatePublicUrl(url) {
|
|
38
38
|
}
|
39
39
|
// To prevent SSRF via DNS rebinding, we need to resolve all IP addresses
|
40
40
|
// and ensure that they are all public:
|
41
|
-
|
41
|
+
let addresses;
|
42
|
+
try {
|
43
|
+
addresses = await lookup(hostname, { all: true });
|
44
|
+
}
|
45
|
+
catch {
|
46
|
+
addresses = [];
|
47
|
+
}
|
42
48
|
for (const { address, family } of addresses) {
|
43
49
|
if (family === 4 && !isValidPublicIPv4Address(address) ||
|
44
50
|
family === 6 && !isValidPublicIPv6Address(address) ||
|
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;
|