@fedify/fedify 1.4.0-dev.599 → 1.4.0-dev.610
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 +110 -0
- 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 +2 -0
- package/esm/vocab/vocab.js +176 -176
- package/esm/webfinger/lookup.js +32 -1
- package/package.json +1 -1
- package/types/federation/middleware.d.ts +3 -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 +9 -0
- package/types/webfinger/lookup.d.ts.map +1 -1
package/CHANGES.md
CHANGED
@@ -39,6 +39,8 @@ To be released.
|
|
39
39
|
- `new Object()` constructor now accepts `emojiReactions` option.
|
40
40
|
- `Object.clone()` method now accepts `emojiReactions` option.
|
41
41
|
|
42
|
+
- Added `allowPrivateAddress` option to `LookupWebFingerOptions` interface.
|
43
|
+
|
42
44
|
- Added `-t`/`--traverse` option to the `fedify lookup` subcommand. [[#195]]
|
43
45
|
|
44
46
|
- Added `-S`/`--suppress-errors` option to the `fedify lookup` subcommand.
|
@@ -48,6 +50,43 @@ To be released.
|
|
48
50
|
[#195]: https://github.com/dahlia/fedify/issues/195
|
49
51
|
|
50
52
|
|
53
|
+
Version 1.3.5
|
54
|
+
-------------
|
55
|
+
|
56
|
+
Released on January 21, 2025.
|
57
|
+
|
58
|
+
- Fixed a bug where `CreateFederationOptions.allowPrivateAddress` option had
|
59
|
+
been ignored by the `Context.lookupObject()` method when it had taken
|
60
|
+
a fediverse handle.
|
61
|
+
|
62
|
+
- The `lookupWebFinger()` function became to silently return `null` when
|
63
|
+
it fails to fetch the WebFinger document due to accessing a private network
|
64
|
+
address, instead of throwing a `UrlError`.
|
65
|
+
|
66
|
+
|
67
|
+
Version 1.3.4
|
68
|
+
-------------
|
69
|
+
|
70
|
+
Released on January 21, 2025.
|
71
|
+
|
72
|
+
- Fixed several security vulnerabilities of the `lookupWebFinger()` function.
|
73
|
+
[[CVE-2025-23221]]
|
74
|
+
|
75
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
76
|
+
had followed the infinite number of redirects, which could lead to
|
77
|
+
a denial of service attack. Now it follows up to 5 redirects.
|
78
|
+
|
79
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
80
|
+
had followed the redirects to other than the HTTP/HTTPS schemes, which
|
81
|
+
could lead to a security breach. Now it follows only the same scheme
|
82
|
+
as the original request.
|
83
|
+
|
84
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
85
|
+
had followed the redirects to the private network addresses, which
|
86
|
+
could lead to a SSRF attack. Now it follows only the public network
|
87
|
+
addresses.
|
88
|
+
|
89
|
+
|
51
90
|
Version 1.3.3
|
52
91
|
-------------
|
53
92
|
|
@@ -192,6 +231,29 @@ Released on November 30, 2024.
|
|
192
231
|
[#193]: https://github.com/dahlia/fedify/issues/193
|
193
232
|
|
194
233
|
|
234
|
+
Version 1.2.11
|
235
|
+
--------------
|
236
|
+
|
237
|
+
Released on January 21, 2025.
|
238
|
+
|
239
|
+
- Fixed several security vulnerabilities of the `lookupWebFinger()` function.
|
240
|
+
[[CVE-2025-23221]]
|
241
|
+
|
242
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
243
|
+
had followed the infinite number of redirects, which could lead to
|
244
|
+
a denial of service attack. Now it follows up to 5 redirects.
|
245
|
+
|
246
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
247
|
+
had followed the redirects to other than the HTTP/HTTPS schemes, which
|
248
|
+
could lead to a security breach. Now it follows only the same scheme
|
249
|
+
as the original request.
|
250
|
+
|
251
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
252
|
+
had followed the redirects to the private network addresses, which
|
253
|
+
could lead to a SSRF attack. Now it follows only the public network
|
254
|
+
addresses.
|
255
|
+
|
256
|
+
|
195
257
|
Version 1.2.10
|
196
258
|
--------------
|
197
259
|
|
@@ -416,6 +478,29 @@ Released on October 31, 2024.
|
|
416
478
|
[#118]: https://github.com/dahlia/fedify/issues/118
|
417
479
|
|
418
480
|
|
481
|
+
Version 1.1.11
|
482
|
+
--------------
|
483
|
+
|
484
|
+
Released on January 21, 2025.
|
485
|
+
|
486
|
+
- Fixed several security vulnerabilities of the `lookupWebFinger()` function.
|
487
|
+
[[CVE-2025-23221]]
|
488
|
+
|
489
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
490
|
+
had followed the infinite number of redirects, which could lead to
|
491
|
+
a denial of service attack. Now it follows up to 5 redirects.
|
492
|
+
|
493
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
494
|
+
had followed the redirects to other than the HTTP/HTTPS schemes, which
|
495
|
+
could lead to a security breach. Now it follows only the same scheme
|
496
|
+
as the original request.
|
497
|
+
|
498
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
499
|
+
had followed the redirects to the private network addresses, which
|
500
|
+
could lead to a SSRF attack. Now it follows only the public network
|
501
|
+
addresses.
|
502
|
+
|
503
|
+
|
419
504
|
Version 1.1.10
|
420
505
|
--------------
|
421
506
|
|
@@ -681,6 +766,31 @@ Released on October 20, 2024.
|
|
681
766
|
[#150]: https://github.com/dahlia/fedify/issues/150
|
682
767
|
|
683
768
|
|
769
|
+
Version 1.0.14
|
770
|
+
--------------
|
771
|
+
|
772
|
+
Released on January 21, 2025.
|
773
|
+
|
774
|
+
- Fixed several security vulnerabilities of the `lookupWebFinger()` function.
|
775
|
+
[[CVE-2025-23221]]
|
776
|
+
|
777
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
778
|
+
had followed the infinite number of redirects, which could lead to
|
779
|
+
a denial of service attack. Now it follows up to 5 redirects.
|
780
|
+
|
781
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
782
|
+
had followed the redirects to other than the HTTP/HTTPS schemes, which
|
783
|
+
could lead to a security breach. Now it follows only the same scheme
|
784
|
+
as the original request.
|
785
|
+
|
786
|
+
- Fixed a security vulnerability where the `lookupWebFinger()` function
|
787
|
+
had followed the redirects to the private network addresses, which
|
788
|
+
could lead to a SSRF attack. Now it follows only the public network
|
789
|
+
addresses.
|
790
|
+
|
791
|
+
[CVE-2025-23221]: https://github.com/dahlia/fedify/security/advisories/GHSA-c59p-wq67-24wx
|
792
|
+
|
793
|
+
|
684
794
|
Version 1.0.13
|
685
795
|
--------------
|
686
796
|
|
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,
|
@@ -1826,6 +1828,8 @@ export class ContextImpl {
|
|
1826
1828
|
contextLoader: options.contextLoader ?? this.contextLoader,
|
1827
1829
|
userAgent: options.userAgent ?? this.federation.userAgent,
|
1828
1830
|
tracerProvider: options.tracerProvider ?? this.tracerProvider,
|
1831
|
+
// @ts-ignore: `allowPrivateAddress` is not in the type definition.
|
1832
|
+
allowPrivateAddress: this.federation.allowPrivateAddress,
|
1829
1833
|
});
|
1830
1834
|
}
|
1831
1835
|
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,8 @@ async function lookupObjectInternal(identifier, options = {}) {
|
|
95
95
|
const jrd = await lookupWebFinger(identifier, {
|
96
96
|
userAgent: options.userAgent,
|
97
97
|
tracerProvider: options.tracerProvider,
|
98
|
+
allowPrivateAddress: "allowPrivateAddress" in options &&
|
99
|
+
options.allowPrivateAddress === true,
|
98
100
|
});
|
99
101
|
if (jrd?.links == null)
|
100
102
|
return null;
|