@fedify/fedify 1.5.4 → 1.5.6

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.
Files changed (22) hide show
  1. package/CHANGES.md +107 -0
  2. package/esm/deno.js +2 -2
  3. package/esm/federation/handler.js +15 -15
  4. package/esm/runtime/docloader.js +1 -1
  5. package/esm/vocab/vocab.js +176 -176
  6. package/package.json +1 -1
  7. package/types/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/common.d.ts.map +1 -1
  8. package/types/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/encoding.d.ts.map +1 -1
  9. package/types/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/language.d.ts.map +1 -1
  10. package/types/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/media_type.d.ts.map +1 -1
  11. package/types/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/negotiation.d.ts.map +1 -1
  12. package/types/runtime/docloader.d.ts.map +1 -1
  13. /package/esm/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/common.js +0 -0
  14. /package/esm/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/encoding.js +0 -0
  15. /package/esm/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/language.js +0 -0
  16. /package/esm/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/media_type.js +0 -0
  17. /package/esm/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/negotiation.js +0 -0
  18. /package/types/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/common.d.ts +0 -0
  19. /package/types/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/encoding.d.ts +0 -0
  20. /package/types/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/language.d.ts +0 -0
  21. /package/types/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/_negotiation/media_type.d.ts +0 -0
  22. /package/types/deps/jsr.io/@std/http/{1.0.18 → 1.0.20}/negotiation.d.ts +0 -0
package/CHANGES.md CHANGED
@@ -3,6 +3,30 @@
3
3
  Fedify changelog
4
4
  ================
5
5
 
6
+ Version 1.5.6
7
+ -------------
8
+
9
+ Released on August 25, 2025.
10
+
11
+ - Fixed a bug where ActivityPub Discovery failed to recognize XHTML
12
+ self-closing `<link>` tags. The HTML/XHTML parser now correctly handles
13
+ whitespace before the self-closing slash (`/>`), improving compatibility
14
+ with XHTML documents that follow the self-closing tag format.
15
+
16
+
17
+ Version 1.5.5
18
+ -------------
19
+
20
+ Released on August 8, 2025.
21
+
22
+ - Fixed a critical authentication bypass vulnerability in the inbox handler
23
+ that allowed unauthenticated attackers to impersonate any ActivityPub actor.
24
+ The vulnerability occurred because activities were processed before
25
+ verifying that the HTTP Signatures key belonged to the claimed actor.
26
+ Now authentication verification is performed before activity processing to
27
+ prevent actor impersonation attacks. [[CVE-2025-54888]]
28
+
29
+
6
30
  Version 1.5.4
7
31
  -------------
8
32
 
@@ -177,6 +201,30 @@ Released on March 28, 2025.
177
201
  [multibase]: https://github.com/multiformats/js-multibase
178
202
 
179
203
 
204
+ Version 1.4.14
205
+ --------------
206
+
207
+ Released on August 25, 2025.
208
+
209
+ - Fixed a bug where ActivityPub Discovery failed to recognize XHTML
210
+ self-closing `<link>` tags. The HTML/XHTML parser now correctly handles
211
+ whitespace before the self-closing slash (`/>`), improving compatibility
212
+ with XHTML documents that follow the self-closing tag format.
213
+
214
+
215
+ Version 1.4.13
216
+ --------------
217
+
218
+ Released on August 8, 2025.
219
+
220
+ - Fixed a critical authentication bypass vulnerability in the inbox handler
221
+ that allowed unauthenticated attackers to impersonate any ActivityPub actor.
222
+ The vulnerability occurred because activities were processed before
223
+ verifying that the HTTP Signatures key belonged to the claimed actor.
224
+ Now authentication verification is performed before activity processing to
225
+ prevent actor impersonation attacks. [[CVE-2025-54888]]
226
+
227
+
180
228
  Version 1.4.12
181
229
  --------------
182
230
 
@@ -426,6 +474,32 @@ Released on February 5, 2025.
426
474
  [#195]: https://github.com/fedify-dev/fedify/issues/195
427
475
 
428
476
 
477
+ Version 1.3.21
478
+ --------------
479
+
480
+ Released on August 25, 2025.
481
+
482
+ - Fixed a bug where ActivityPub Discovery failed to recognize XHTML
483
+ self-closing `<link>` tags. The HTML/XHTML parser now correctly handles
484
+ whitespace before the self-closing slash (`/>`), improving compatibility
485
+ with XHTML documents that follow the self-closing tag format.
486
+
487
+
488
+ Version 1.3.20
489
+ --------------
490
+
491
+ Released on August 8, 2025.
492
+
493
+ - Fixed a critical authentication bypass vulnerability in the inbox handler
494
+ that allowed unauthenticated attackers to impersonate any ActivityPub actor.
495
+ The vulnerability occurred because activities were processed before
496
+ verifying that the HTTP Signatures key belonged to the claimed actor.
497
+ Now authentication verification is performed before activity processing to
498
+ prevent actor impersonation attacks. [[CVE-2025-54888]]
499
+
500
+ [CVE-2025-54888]: https://github.com/fedify-dev/fedify/security/advisories/GHSA-6jcc-xgcr-q3h4
501
+
502
+
429
503
  Version 1.3.19
430
504
  --------------
431
505
 
@@ -791,6 +865,17 @@ Released on November 30, 2024.
791
865
  [#193]: https://github.com/fedify-dev/fedify/issues/193
792
866
 
793
867
 
868
+ Version 1.2.24
869
+ --------------
870
+
871
+ Released on August 25, 2025.
872
+
873
+ - Fixed a bug where ActivityPub Discovery failed to recognize XHTML
874
+ self-closing `<link>` tags. The HTML/XHTML parser now correctly handles
875
+ whitespace before the self-closing slash (`/>`), improving compatibility
876
+ with XHTML documents that follow the self-closing tag format.
877
+
878
+
794
879
  Version 1.2.23
795
880
  --------------
796
881
 
@@ -1204,6 +1289,17 @@ Released on October 31, 2024.
1204
1289
  [#118]: https://github.com/fedify-dev/fedify/issues/118
1205
1290
 
1206
1291
 
1292
+ Version 1.1.24
1293
+ --------------
1294
+
1295
+ Released on August 25, 2025.
1296
+
1297
+ - Fixed a bug where ActivityPub Discovery failed to recognize XHTML
1298
+ self-closing `<link>` tags. The HTML/XHTML parser now correctly handles
1299
+ whitespace before the self-closing slash (`/>`), improving compatibility
1300
+ with XHTML documents that follow the self-closing tag format.
1301
+
1302
+
1207
1303
  Version 1.1.23
1208
1304
  --------------
1209
1305
 
@@ -1658,6 +1754,17 @@ Released on October 20, 2024.
1658
1754
  [#150]: https://github.com/fedify-dev/fedify/issues/150
1659
1755
 
1660
1756
 
1757
+ Version 1.0.27
1758
+ --------------
1759
+
1760
+ Released on August 25, 2025.
1761
+
1762
+ - Fixed a bug where ActivityPub Discovery failed to recognize XHTML
1763
+ self-closing `<link>` tags. The HTML/XHTML parser now correctly handles
1764
+ whitespace before the self-closing slash (`/>`), improving compatibility
1765
+ with XHTML documents that follow the self-closing tag format.
1766
+
1767
+
1661
1768
  Version 1.0.26
1662
1769
  --------------
1663
1770
 
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.5.4",
3
+ "version": "1.5.6",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./mod.ts",
@@ -26,7 +26,7 @@ export default {
26
26
  "@opentelemetry/semantic-conventions": "npm:@opentelemetry/semantic-conventions@^1.27.0",
27
27
  "@phensley/language-tag": "npm:@phensley/language-tag@^1.9.0",
28
28
  "@std/assert": "jsr:@std/assert@^0.226.0",
29
- "@std/async": "jsr:@std/async@^1.0.5",
29
+ "@std/async": "jsr:@std/async@1.0.13",
30
30
  "@std/bytes": "jsr:@std/bytes@^1.0.2",
31
31
  "@std/collections": "jsr:@std/collections@^1.0.6",
32
32
  "@std/encoding": "jsr:@std/encoding@1.0.7",
@@ -1,6 +1,6 @@
1
1
  import { getLogger } from "@logtape/logtape";
2
2
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
3
- import { accepts } from "../deps/jsr.io/@std/http/1.0.18/negotiation.js";
3
+ import { accepts } from "../deps/jsr.io/@std/http/1.0.20/negotiation.js";
4
4
  import metadata from "../deno.js";
5
5
  import { verifyRequest } from "../sig/http.js";
6
6
  import { detachSignature, verifyJsonLd } from "../sig/ld.js";
@@ -472,20 +472,6 @@ async function handleInboxInternal(request, { recipient, context: ctx, inboxCont
472
472
  span.setAttribute("activitypub.activity.id", activity.id.href);
473
473
  }
474
474
  span.setAttribute("activitypub.activity.type", getTypeId(activity).href);
475
- const routeResult = await routeActivity({
476
- context: ctx,
477
- json,
478
- activity,
479
- recipient,
480
- inboxListeners,
481
- inboxContextFactory,
482
- inboxErrorHandler,
483
- kv,
484
- kvPrefixes,
485
- queue,
486
- span,
487
- tracerProvider,
488
- });
489
475
  if (httpSigKey != null && !await doesActorOwnKey(activity, httpSigKey, ctx)) {
490
476
  logger.error("The signer ({keyId}) and the actor ({actorId}) do not match.", {
491
477
  activity: json,
@@ -503,6 +489,20 @@ async function handleInboxInternal(request, { recipient, context: ctx, inboxCont
503
489
  headers: { "Content-Type": "text/plain; charset=utf-8" },
504
490
  });
505
491
  }
492
+ const routeResult = await routeActivity({
493
+ context: ctx,
494
+ json,
495
+ activity,
496
+ recipient,
497
+ inboxListeners,
498
+ inboxContextFactory,
499
+ inboxErrorHandler,
500
+ kv,
501
+ kvPrefixes,
502
+ queue,
503
+ span,
504
+ tracerProvider,
505
+ });
506
506
  if (routeResult === "alreadyProcessed") {
507
507
  return new Response(`Activity <${activity.id}> has already been processed.`, {
508
508
  status: 202,
@@ -108,7 +108,7 @@ async function getRemoteDocument(url, response, fetch) {
108
108
  (contentType === "text/html" || contentType?.startsWith("text/html;") ||
109
109
  contentType === "application/xhtml+xml" ||
110
110
  contentType?.startsWith("application/xhtml+xml;"))) {
111
- const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\/?>/ig;
111
+ const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\s*\/?>/ig;
112
112
  const p2 = /\s+([a-z][a-z:_-]*)=("([^"]*)"|'([^']*)'|([^\s>]+))/ig;
113
113
  const html = await response.text();
114
114
  let m;