@fedify/fedify 1.6.7 → 1.6.9

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 (114) hide show
  1. package/dist/{actor-fvEQljsh.js → actor-DY_ediuQ.js} +179 -225
  2. package/dist/{actor-CJUOVkus.js → actor-qNVQigMJ.js} +3 -3
  3. package/dist/{authdocloader-UN6bFYqE.js → authdocloader-ColUu5fh.js} +3 -3
  4. package/dist/{authdocloader-sLr3_CKo.js → authdocloader-DTpSS6vq.js} +3 -3
  5. package/dist/{builder-Dwwf9LZs.js → builder-CTAic_n3.js} +3 -3
  6. package/dist/{client-BOQZYjsA.js → client-Bp-TqQI6.js} +1 -1
  7. package/dist/compat/transformers.test.d.ts +2 -1
  8. package/dist/compat/transformers.test.js +19 -18
  9. package/dist/{context-B9H6ypbl.js → context-BAx407GT.js} +2 -2
  10. package/dist/{docloader-D27WkV2-.js → docloader-NmruKwBX.js} +2 -2
  11. package/dist/{docloader-BpcD_SLO.js → docloader-UqcHJRjL.js} +2 -2
  12. package/dist/{esm-CASHO3OR.js → esm-Db4De7AS.js} +5 -7
  13. package/dist/federation/builder.test.d.ts +2 -1
  14. package/dist/federation/builder.test.js +6 -5
  15. package/dist/federation/collection.test.d.ts +2 -1
  16. package/dist/federation/collection.test.js +2 -1
  17. package/dist/federation/handler.test.d.ts +2 -1
  18. package/dist/federation/handler.test.js +79 -20
  19. package/dist/federation/inbox.test.d.ts +2 -1
  20. package/dist/federation/inbox.test.js +5 -4
  21. package/dist/federation/keycache.test.d.ts +2 -1
  22. package/dist/federation/keycache.test.js +5 -4
  23. package/dist/federation/kv.test.d.ts +2 -1
  24. package/dist/federation/kv.test.js +2 -1
  25. package/dist/federation/middleware.test.d.ts +2 -1
  26. package/dist/federation/middleware.test.js +21 -20
  27. package/dist/federation/mod.js +10 -10
  28. package/dist/federation/mq.test.d.ts +2 -1
  29. package/dist/federation/mq.test.js +2 -1
  30. package/dist/federation/retry.test.d.ts +2 -1
  31. package/dist/federation/retry.test.js +2 -1
  32. package/dist/federation/router.test.d.ts +2 -1
  33. package/dist/federation/router.test.js +2 -1
  34. package/dist/federation/send.test.d.ts +2 -1
  35. package/dist/federation/send.test.js +12 -11
  36. package/dist/{http-DEMqisx6.js → http-DjFoawa6.js} +3 -3
  37. package/dist/{http-hhXcurBA.js → http-XWz7prGl.js} +3 -3
  38. package/dist/{inbox-Dn9cGz72.js → inbox-eAHML3xw.js} +2 -2
  39. package/dist/{key-BS8tcPCt.js → key-B4UFmNvL.js} +2 -2
  40. package/dist/{key-heR1cMpe.js → key-ByAyOg3m.js} +5 -5
  41. package/dist/{key-Djjl3-NI.js → key-C1UhN1LT.js} +4 -4
  42. package/dist/{key-HZNzd-FS.js → key-CUEyp_yz.js} +3 -3
  43. package/dist/{keycache-DxrNxDV9.js → keycache-YqFJn7EL.js} +1 -1
  44. package/dist/{keys-cVHkVfkB.js → keys-Dd_v3HDs.js} +1 -1
  45. package/dist/{ld-BHlSwz3F.js → ld-D8WCx-VU.js} +3 -3
  46. package/dist/{lookup-d9KQSGH3.js → lookup-DEN8lvde.js} +1 -1
  47. package/dist/{lookup-D1UwpzKL.js → lookup-DHlMvC3Q.js} +1 -1
  48. package/dist/{lookup-DZ5JT-dZ.js → lookup-DggOHyrB.js} +3 -3
  49. package/dist/middleware-B-ysz1Gc.js +17 -0
  50. package/dist/middleware-Bmr-V4-W.js +33 -0
  51. package/dist/{middleware-DbABwSSq.js → middleware-D_j7IO2V.js} +29 -29
  52. package/dist/{middleware-jYmGxpPU.js → middleware-mmR5eUDI.js} +24 -24
  53. package/dist/mod.js +10 -10
  54. package/dist/nodeinfo/client.test.d.ts +2 -1
  55. package/dist/nodeinfo/client.test.js +5 -4
  56. package/dist/nodeinfo/handler.test.d.ts +2 -1
  57. package/dist/nodeinfo/handler.test.js +20 -19
  58. package/dist/nodeinfo/mod.js +2 -2
  59. package/dist/nodeinfo/semver.test.d.ts +2 -1
  60. package/dist/nodeinfo/semver.test.js +2 -1
  61. package/dist/nodeinfo/types.test.d.ts +2 -1
  62. package/dist/nodeinfo/types.test.js +2 -1
  63. package/dist/{owner-CY_4qryA.js → owner-lYBh2f5Z.js} +3 -3
  64. package/dist/{proof-NEDLECyh.js → proof-BAoGg0DQ.js} +3 -3
  65. package/dist/{proof-ZOvHKN5-.js → proof-CPamyAcG.js} +3 -3
  66. package/dist/runtime/authdocloader.test.d.ts +2 -1
  67. package/dist/runtime/authdocloader.test.js +11 -10
  68. package/dist/runtime/docloader.test.d.ts +2 -1
  69. package/dist/runtime/docloader.test.js +28 -3
  70. package/dist/runtime/key.test.d.ts +2 -1
  71. package/dist/runtime/key.test.js +7 -6
  72. package/dist/runtime/langstr.test.d.ts +2 -1
  73. package/dist/runtime/langstr.test.js +2 -1
  74. package/dist/runtime/mod.js +6 -6
  75. package/dist/runtime/multibase/multibase.test.d.ts +2 -1
  76. package/dist/runtime/multibase/multibase.test.js +2 -1
  77. package/dist/runtime/url.test.d.ts +2 -1
  78. package/dist/runtime/url.test.js +2 -1
  79. package/dist/{send-BrO7rgzl.js → send-CrbpYrfD.js} +2 -2
  80. package/dist/sig/http.test.d.ts +2 -1
  81. package/dist/sig/http.test.js +10 -9
  82. package/dist/sig/key.test.d.ts +2 -1
  83. package/dist/sig/key.test.js +8 -7
  84. package/dist/sig/ld.test.d.ts +2 -1
  85. package/dist/sig/ld.test.js +9 -8
  86. package/dist/sig/mod.js +6 -6
  87. package/dist/sig/owner.test.d.ts +2 -1
  88. package/dist/sig/owner.test.js +10 -9
  89. package/dist/sig/proof.test.d.ts +2 -1
  90. package/dist/sig/proof.test.js +9 -8
  91. package/dist/testing/docloader.test.d.ts +2 -1
  92. package/dist/testing/docloader.test.js +2 -1
  93. package/dist/{types-45TSQHsw.js → types-Bl1hBU1t.js} +1 -1
  94. package/dist/vocab/actor.test.d.ts +2 -1
  95. package/dist/vocab/actor.test.js +8 -10
  96. package/dist/vocab/lookup.test.d.ts +2 -1
  97. package/dist/vocab/lookup.test.js +7 -6
  98. package/dist/vocab/mod.js +4 -4
  99. package/dist/vocab/type.test.d.ts +2 -1
  100. package/dist/vocab/type.test.js +4 -3
  101. package/dist/vocab/vocab.test.d.ts +2 -1
  102. package/dist/vocab/vocab.test.js +19 -18
  103. package/dist/{vocab-DzvTuYjm.js → vocab-Cs9KbJAx.js} +178 -224
  104. package/dist/{vocab-B42jXGwc.js → vocab-DSVoOj6P.js} +3 -3
  105. package/dist/webfinger/handler.test.d.ts +2 -1
  106. package/dist/webfinger/handler.test.js +20 -19
  107. package/dist/webfinger/lookup.test.d.ts +2 -1
  108. package/dist/webfinger/lookup.test.js +5 -4
  109. package/dist/webfinger/mod.js +2 -2
  110. package/dist/x/cfworkers.test.d.ts +2 -1
  111. package/dist/x/cfworkers.test.js +2 -1
  112. package/package.json +1 -1
  113. package/dist/middleware-YRLKRl1N.js +0 -17
  114. package/dist/middleware-lqxhBcoT.js +0 -33
@@ -3,9 +3,9 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default } from "./docloader-BpcD_SLO.js";
7
- import { Application, Group, Organization, Person, Service } from "./vocab-DzvTuYjm.js";
8
- import { lookupWebFinger } from "./lookup-d9KQSGH3.js";
6
+ import { deno_default } from "./docloader-UqcHJRjL.js";
7
+ import { Application, Group, Organization, Person, Service } from "./vocab-Cs9KbJAx.js";
8
+ import { lookupWebFinger } from "./lookup-DEN8lvde.js";
9
9
  import { getTypeId } from "./type-D2s5lmbZ.js";
10
10
  import { SpanStatusCode, trace } from "@opentelemetry/api";
11
11
  import { domainToASCII, domainToUnicode } from "node:url";
@@ -2,9 +2,9 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-D27WkV2-.js";
6
- import { validateCryptoKey } from "./key-BS8tcPCt.js";
7
- import { doubleKnock } from "./http-hhXcurBA.js";
5
+ import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-NmruKwBX.js";
6
+ import { validateCryptoKey } from "./key-B4UFmNvL.js";
7
+ import { doubleKnock } from "./http-XWz7prGl.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
 
10
10
  //#region runtime/authdocloader.ts
@@ -3,10 +3,10 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { createRequest, getRemoteDocument, logRequest } from "./docloader-BpcD_SLO.js";
6
+ import { createRequest, getRemoteDocument, logRequest } from "./docloader-UqcHJRjL.js";
7
7
  import { UrlError, validatePublicUrl } from "./url-kTAI6_KP.js";
8
- import { validateCryptoKey } from "./key-HZNzd-FS.js";
9
- import { doubleKnock } from "./http-DEMqisx6.js";
8
+ import { validateCryptoKey } from "./key-CUEyp_yz.js";
9
+ import { doubleKnock } from "./http-DjFoawa6.js";
10
10
  import { getLogger } from "@logtape/logtape";
11
11
 
12
12
  //#region runtime/authdocloader.ts
@@ -3,10 +3,10 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default } from "./docloader-BpcD_SLO.js";
6
+ import { deno_default } from "./docloader-UqcHJRjL.js";
7
7
  import { Router, RouterError } from "./router-D_aVZZUc.js";
8
8
  import { getTypeId } from "./type-D2s5lmbZ.js";
9
- import { InboxListenerSet } from "./inbox-Dn9cGz72.js";
9
+ import { InboxListenerSet } from "./inbox-eAHML3xw.js";
10
10
  import { getLogger } from "@logtape/logtape";
11
11
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
12
12
 
@@ -34,7 +34,7 @@ var FederationBuilderImpl = class {
34
34
  this.objectTypeIds = {};
35
35
  }
36
36
  async build(options) {
37
- const { FederationImpl } = await import("./middleware-lqxhBcoT.js");
37
+ const { FederationImpl } = await import("./middleware-Bmr-V4-W.js");
38
38
  const f = new FederationImpl(options);
39
39
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
40
40
  f.router = this.router.clone();
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { getUserAgent } from "./docloader-BpcD_SLO.js";
6
+ import { getUserAgent } from "./docloader-UqcHJRjL.js";
7
7
  import { parseSemVer } from "./semver-DWClQt_5.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
 
@@ -1,3 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- globalThis.addEventListener = () => {};
3
+ globalThis.addEventListener = () => {};
4
+ export {};
@@ -7,32 +7,32 @@ import { assertEquals } from "../assert_equals-CTYbeopb.js";
7
7
  import { assert } from "../assert-DmFG7ppO.js";
8
8
  import { assertInstanceOf } from "../assert_instance_of-CF09JHYM.js";
9
9
  import { MemoryKvStore } from "../kv-DohFOP2C.js";
10
- import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-DbABwSSq.js";
11
- import "../docloader-BpcD_SLO.js";
10
+ import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-D_j7IO2V.js";
11
+ import "../docloader-UqcHJRjL.js";
12
12
  import "../url-kTAI6_KP.js";
13
13
  import "../semver-DWClQt_5.js";
14
- import "../client-BOQZYjsA.js";
14
+ import "../client-Bp-TqQI6.js";
15
15
  import "../router-D_aVZZUc.js";
16
16
  import "../types-C7C_l-jz.js";
17
17
  import "../multibase-DeCHcK8L.js";
18
- import { Follow, Person } from "../vocab-DzvTuYjm.js";
18
+ import { Follow, Person } from "../vocab-Cs9KbJAx.js";
19
19
  import "../langstr-DbWheeIS.js";
20
- import "../lookup-d9KQSGH3.js";
20
+ import "../lookup-DEN8lvde.js";
21
21
  import "../type-D2s5lmbZ.js";
22
- import "../actor-CJUOVkus.js";
23
- import "../key-HZNzd-FS.js";
24
- import "../http-DEMqisx6.js";
25
- import "../authdocloader-sLr3_CKo.js";
26
- import "../ld-BHlSwz3F.js";
27
- import "../owner-CY_4qryA.js";
28
- import "../proof-NEDLECyh.js";
29
- import "../lookup-DZ5JT-dZ.js";
30
- import "../inbox-Dn9cGz72.js";
31
- import "../builder-Dwwf9LZs.js";
22
+ import "../actor-qNVQigMJ.js";
23
+ import "../key-CUEyp_yz.js";
24
+ import "../http-DjFoawa6.js";
25
+ import "../authdocloader-DTpSS6vq.js";
26
+ import "../ld-D8WCx-VU.js";
27
+ import "../owner-lYBh2f5Z.js";
28
+ import "../proof-BAoGg0DQ.js";
29
+ import "../lookup-DggOHyrB.js";
30
+ import "../inbox-eAHML3xw.js";
31
+ import "../builder-CTAic_n3.js";
32
32
  import "../collection-Dfb0TPno.js";
33
- import "../keycache-DxrNxDV9.js";
33
+ import "../keycache-YqFJn7EL.js";
34
34
  import "../retry-BiIhZWgD.js";
35
- import "../send-BrO7rgzl.js";
35
+ import "../send-CrbpYrfD.js";
36
36
  import { test } from "../testing-BZ0dJ4qn.js";
37
37
 
38
38
  //#region compat/transformers.test.ts
@@ -90,4 +90,5 @@ test("actorDehydrator()", async () => {
90
90
  }).toJsonLd());
91
91
  });
92
92
 
93
- //#endregion
93
+ //#endregion
94
+ export { };
@@ -4,8 +4,8 @@
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
6
  import { RouterError } from "./router-D_aVZZUc.js";
7
- import { lookupWebFinger } from "./lookup-d9KQSGH3.js";
8
- import { lookupObject, traverseCollection } from "./lookup-DZ5JT-dZ.js";
7
+ import { lookupWebFinger } from "./lookup-DEN8lvde.js";
8
+ import { lookupObject, traverseCollection } from "./lookup-DggOHyrB.js";
9
9
  import { mockDocumentLoader } from "./docloader-09nVWLAZ.js";
10
10
  import { trace } from "@opentelemetry/api";
11
11
 
@@ -10,7 +10,7 @@ import { isIP } from "node:net";
10
10
 
11
11
  //#region deno.json
12
12
  var name = "@fedify/fedify";
13
- var version = "1.6.7";
13
+ var version = "1.6.9";
14
14
  var license = "MIT";
15
15
  var exports = {
16
16
  ".": "./mod.ts",
@@ -4420,7 +4420,7 @@ async function getRemoteDocument(url, response, fetch$1) {
4420
4420
  }
4421
4421
  let document;
4422
4422
  if (!jsonLd && (contentType === "text/html" || contentType?.startsWith("text/html;") || contentType === "application/xhtml+xml" || contentType?.startsWith("application/xhtml+xml;"))) {
4423
- const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\/?>/gi;
4423
+ const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\s*\/?>/gi;
4424
4424
  const p2 = /\s+([a-z][a-z:_-]*)=("([^"]*)"|'([^']*)'|([^\s>]+))/gi;
4425
4425
  const html = await response.text();
4426
4426
  let m;
@@ -10,7 +10,7 @@ import process from "node:process";
10
10
 
11
11
  //#region deno.json
12
12
  var name = "@fedify/fedify";
13
- var version = "1.6.7";
13
+ var version = "1.6.9";
14
14
  var license = "MIT";
15
15
  var exports = {
16
16
  ".": "./mod.ts",
@@ -4361,7 +4361,7 @@ async function getRemoteDocument(url, response, fetch$1) {
4361
4361
  }
4362
4362
  let document;
4363
4363
  if (!jsonLd && (contentType === "text/html" || contentType?.startsWith("text/html;") || contentType === "application/xhtml+xml" || contentType?.startsWith("application/xhtml+xml;"))) {
4364
- const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\/?>/gi;
4364
+ const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\s*\/?>/gi;
4365
4365
  const p2 = /\s+([a-z][a-z:_-]*)=("([^"]*)"|'([^']*)'|([^\s>]+))/gi;
4366
4366
  const html = await response.text();
4367
4367
  let m;
@@ -6,7 +6,7 @@
6
6
  import { __commonJS, __toESM } from "./chunk-HsBuZ-b2.js";
7
7
 
8
8
  //#region node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
9
- var require_glob_to_regexp = __commonJS({ "node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js"(exports, module) {
9
+ var require_glob_to_regexp = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js": ((exports, module) => {
10
10
  module.exports = function(glob$1, opts) {
11
11
  if (typeof glob$1 !== "string") throw new TypeError("Expected a string");
12
12
  var str = String(glob$1);
@@ -80,7 +80,7 @@ var require_glob_to_regexp = __commonJS({ "node_modules/.pnpm/glob-to-regexp@0.4
80
80
  if (!flags || !~flags.indexOf("g")) reStr = "^" + reStr + "$";
81
81
  return new RegExp(reStr, flags);
82
82
  };
83
- } });
83
+ }) });
84
84
 
85
85
  //#endregion
86
86
  //#region node_modules/.pnpm/regexparam@3.0.0/node_modules/regexparam/dist/index.mjs
@@ -232,7 +232,7 @@ const isSubsetOf = function(subset, superset, visited = []) {
232
232
  switch (subsetItemType) {
233
233
  case "array":
234
234
  case "object":
235
- case "function": {
235
+ case "function":
236
236
  if (visited.includes(subsetItem)) continue;
237
237
  visited.push(subsetItem);
238
238
  isItemInSuperset = superset.some((supersetItem) => {
@@ -243,7 +243,6 @@ const isSubsetOf = function(subset, superset, visited = []) {
243
243
  }
244
244
  });
245
245
  break;
246
- }
247
246
  default: isItemInSuperset = superset.includes(subsetItem);
248
247
  }
249
248
  if (!isItemInSuperset) return false;
@@ -259,7 +258,7 @@ const isSubsetOf = function(subset, superset, visited = []) {
259
258
  switch (subsetValueType) {
260
259
  case "array":
261
260
  case "object":
262
- case "function": {
261
+ case "function":
263
262
  if (visited.includes(subsetValue)) continue;
264
263
  visited.push(subsetValue);
265
264
  try {
@@ -269,7 +268,6 @@ const isSubsetOf = function(subset, superset, visited = []) {
269
268
  return false;
270
269
  }
271
270
  break;
272
- }
273
271
  default: if (subsetValue !== supersetValue) return false;
274
272
  }
275
273
  }
@@ -445,7 +443,7 @@ function normalizeHeaders(headers) {
445
443
 
446
444
  //#endregion
447
445
  //#region node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/Matchers.js
448
- var import_glob_to_regexp = __toESM(require_glob_to_regexp(), 1);
446
+ var import_glob_to_regexp = /* @__PURE__ */ __toESM(require_glob_to_regexp(), 1);
449
447
  const isUrlMatcher = (matcher) => matcher instanceof RegExp || typeof matcher === "string" || typeof matcher === "object" && "href" in matcher;
450
448
  const isFunctionMatcher = (matcher) => typeof matcher === "function";
451
449
  const stringMatchers = {
@@ -1,3 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- globalThis.addEventListener = () => {};
3
+ globalThis.addEventListener = () => {};
4
+ export {};
@@ -7,16 +7,16 @@ import { assertEquals } from "../assert_equals-CTYbeopb.js";
7
7
  import "../assert-DmFG7ppO.js";
8
8
  import "../assert_instance_of-CF09JHYM.js";
9
9
  import { MemoryKvStore } from "../kv-DohFOP2C.js";
10
- import "../docloader-BpcD_SLO.js";
10
+ import "../docloader-UqcHJRjL.js";
11
11
  import "../url-kTAI6_KP.js";
12
12
  import { parseSemVer } from "../semver-DWClQt_5.js";
13
13
  import "../router-D_aVZZUc.js";
14
14
  import "../multibase-DeCHcK8L.js";
15
- import { Activity, Note, Person } from "../vocab-DzvTuYjm.js";
15
+ import { Activity, Note, Person } from "../vocab-Cs9KbJAx.js";
16
16
  import "../langstr-DbWheeIS.js";
17
17
  import "../type-D2s5lmbZ.js";
18
- import "../inbox-Dn9cGz72.js";
19
- import { createFederationBuilder } from "../builder-Dwwf9LZs.js";
18
+ import "../inbox-eAHML3xw.js";
19
+ import { createFederationBuilder } from "../builder-CTAic_n3.js";
20
20
  import { test } from "../testing-BZ0dJ4qn.js";
21
21
  import { assertExists } from "../std__assert-vp0TKMS1.js";
22
22
  import "../assert_rejects-C-sxEMM5.js";
@@ -135,4 +135,5 @@ test("FederationBuilder", async (t) => {
135
135
  });
136
136
  });
137
137
 
138
- //#endregion
138
+ //#endregion
139
+ export { };
@@ -1,3 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- globalThis.addEventListener = () => {};
3
+ globalThis.addEventListener = () => {};
4
+ export {};
@@ -30,4 +30,5 @@ test("buildCollectionSynchronizationHeader()", async () => {
30
30
  assertEquals(header, "collectionId=\"https://testing.example.org/users/1/followers\", url=\"https://testing.example.org/users/1/followers?base-url=https%3A%2F%2Ftesting.example.org%2F\", digest=\"c33f48cd341ef046a206b8a72ec97af65079f9a3a9b90eef79c5920dce45c61f\"");
31
31
  });
32
32
 
33
- //#endregion
33
+ //#endregion
34
+ export { };
@@ -1,3 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- globalThis.addEventListener = () => {};
3
+ globalThis.addEventListener = () => {};
4
+ export {};
@@ -7,32 +7,32 @@ import { assertEquals } from "../assert_equals-CTYbeopb.js";
7
7
  import { assert } from "../assert-DmFG7ppO.js";
8
8
  import "../assert_instance_of-CF09JHYM.js";
9
9
  import { MemoryKvStore } from "../kv-DohFOP2C.js";
10
- import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-DbABwSSq.js";
11
- import "../docloader-BpcD_SLO.js";
10
+ import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-D_j7IO2V.js";
11
+ import "../docloader-UqcHJRjL.js";
12
12
  import "../url-kTAI6_KP.js";
13
13
  import "../semver-DWClQt_5.js";
14
- import "../client-BOQZYjsA.js";
14
+ import "../client-Bp-TqQI6.js";
15
15
  import "../router-D_aVZZUc.js";
16
16
  import "../types-C7C_l-jz.js";
17
17
  import "../multibase-DeCHcK8L.js";
18
- import { Create, Note, Person } from "../vocab-DzvTuYjm.js";
18
+ import { Create, Note, Person } from "../vocab-Cs9KbJAx.js";
19
19
  import "../langstr-DbWheeIS.js";
20
- import "../lookup-d9KQSGH3.js";
20
+ import "../lookup-DEN8lvde.js";
21
21
  import "../type-D2s5lmbZ.js";
22
- import "../actor-CJUOVkus.js";
23
- import "../key-HZNzd-FS.js";
24
- import { signRequest } from "../http-DEMqisx6.js";
25
- import "../authdocloader-sLr3_CKo.js";
26
- import "../ld-BHlSwz3F.js";
27
- import "../owner-CY_4qryA.js";
28
- import "../proof-NEDLECyh.js";
29
- import "../lookup-DZ5JT-dZ.js";
30
- import "../inbox-Dn9cGz72.js";
31
- import "../builder-Dwwf9LZs.js";
22
+ import "../actor-qNVQigMJ.js";
23
+ import "../key-CUEyp_yz.js";
24
+ import { signRequest } from "../http-DjFoawa6.js";
25
+ import "../authdocloader-DTpSS6vq.js";
26
+ import "../ld-D8WCx-VU.js";
27
+ import "../owner-lYBh2f5Z.js";
28
+ import "../proof-BAoGg0DQ.js";
29
+ import "../lookup-DggOHyrB.js";
30
+ import { InboxListenerSet } from "../inbox-eAHML3xw.js";
31
+ import "../builder-CTAic_n3.js";
32
32
  import "../collection-Dfb0TPno.js";
33
- import "../keycache-DxrNxDV9.js";
33
+ import "../keycache-YqFJn7EL.js";
34
34
  import "../retry-BiIhZWgD.js";
35
- import "../send-BrO7rgzl.js";
35
+ import "../send-CrbpYrfD.js";
36
36
  import { test } from "../testing-BZ0dJ4qn.js";
37
37
  import "../std__assert-vp0TKMS1.js";
38
38
  import { assertFalse } from "../assert_rejects-C-sxEMM5.js";
@@ -40,8 +40,8 @@ import "../assert_is_error-nrwA1GeT.js";
40
40
  import "../assert_not_equals-Dc7y-V5Q.js";
41
41
  import "../assert_throws-Cn9C6Jur.js";
42
42
  import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
43
- import { createInboxContext, createRequestContext } from "../context-B9H6ypbl.js";
44
- import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-cVHkVfkB.js";
43
+ import { createInboxContext, createRequestContext } from "../context-BAx407GT.js";
44
+ import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-Dd_v3HDs.js";
45
45
 
46
46
  //#region federation/handler.test.ts
47
47
  test("acceptsJsonLd()", () => {
@@ -1203,6 +1203,64 @@ test("respondWithObject()", async () => {
1203
1203
  content: "Hello, world!"
1204
1204
  });
1205
1205
  });
1206
+ test("handleInbox() - authentication bypass vulnerability", async () => {
1207
+ const federation = createFederation({ kv: new MemoryKvStore() });
1208
+ let processedActivity;
1209
+ const inboxListeners = new InboxListenerSet();
1210
+ inboxListeners.add(Create, (_ctx, activity) => {
1211
+ processedActivity = activity;
1212
+ });
1213
+ const maliciousActivity = new Create({
1214
+ id: new URL("https://attacker.example.com/activities/malicious"),
1215
+ actor: new URL("https://victim.example.com/users/alice"),
1216
+ object: new Note({
1217
+ id: new URL("https://attacker.example.com/notes/forged"),
1218
+ attribution: new URL("https://victim.example.com/users/alice"),
1219
+ content: "This is a forged message from the victim!"
1220
+ })
1221
+ });
1222
+ const maliciousRequest = await signRequest(new Request("https://example.com/", {
1223
+ method: "POST",
1224
+ body: JSON.stringify(await maliciousActivity.toJsonLd())
1225
+ }), rsaPrivateKey3, rsaPublicKey3.id);
1226
+ const maliciousContext = createRequestContext({
1227
+ request: maliciousRequest,
1228
+ url: new URL(maliciousRequest.url),
1229
+ data: void 0,
1230
+ documentLoader: mockDocumentLoader,
1231
+ federation
1232
+ });
1233
+ const actorDispatcher = (_ctx, identifier) => {
1234
+ if (identifier !== "someone") return null;
1235
+ return new Person({ name: "Someone" });
1236
+ };
1237
+ const response = await handleInbox(maliciousRequest, {
1238
+ recipient: "someone",
1239
+ context: maliciousContext,
1240
+ inboxContextFactory(_activity) {
1241
+ return createInboxContext({
1242
+ url: new URL(maliciousRequest.url),
1243
+ data: void 0,
1244
+ documentLoader: mockDocumentLoader,
1245
+ federation,
1246
+ recipient: "someone"
1247
+ });
1248
+ },
1249
+ kv: new MemoryKvStore(),
1250
+ kvPrefixes: {
1251
+ activityIdempotence: ["_fedify", "activityIdempotence"],
1252
+ publicKey: ["_fedify", "publicKey"]
1253
+ },
1254
+ actorDispatcher,
1255
+ inboxListeners,
1256
+ onNotFound: () => new Response("Not found", { status: 404 }),
1257
+ signatureTimeWindow: { minutes: 5 },
1258
+ skipSignatureVerification: false
1259
+ });
1260
+ assertEquals(response.status, 401);
1261
+ assertEquals(await response.text(), "The signer and the actor do not match.");
1262
+ assertEquals(processedActivity, void 0, `SECURITY VULNERABILITY: Malicious activity with mismatched signature was processed! Activity ID: ${processedActivity?.id?.href}, Claimed actor: ${processedActivity?.actorId?.href}`);
1263
+ });
1206
1264
  test("respondWithObjectIfAcceptable", async () => {
1207
1265
  let request = new Request("https://example.com/", { headers: { Accept: "application/activity+json" } });
1208
1266
  let response = await respondWithObjectIfAcceptable(new Note({
@@ -1244,4 +1302,5 @@ test("respondWithObjectIfAcceptable", async () => {
1244
1302
  assertEquals(response, null);
1245
1303
  });
1246
1304
 
1247
- //#endregion
1305
+ //#endregion
1306
+ export { };
@@ -1,3 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- globalThis.addEventListener = () => {};
3
+ globalThis.addEventListener = () => {};
4
+ export {};
@@ -4,13 +4,13 @@
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
6
  import { assertEquals } from "../assert_equals-CTYbeopb.js";
7
- import "../docloader-BpcD_SLO.js";
7
+ import "../docloader-UqcHJRjL.js";
8
8
  import "../url-kTAI6_KP.js";
9
9
  import "../multibase-DeCHcK8L.js";
10
- import { Activity, Create, Invite, Offer, Update } from "../vocab-DzvTuYjm.js";
10
+ import { Activity, Create, Invite, Offer, Update } from "../vocab-Cs9KbJAx.js";
11
11
  import "../langstr-DbWheeIS.js";
12
12
  import "../type-D2s5lmbZ.js";
13
- import { InboxListenerSet } from "../inbox-Dn9cGz72.js";
13
+ import { InboxListenerSet } from "../inbox-eAHML3xw.js";
14
14
  import { test } from "../testing-BZ0dJ4qn.js";
15
15
  import "../assert_is_error-nrwA1GeT.js";
16
16
  import { assertThrows } from "../assert_throws-Cn9C6Jur.js";
@@ -92,4 +92,5 @@ test("InboxListenerSet", () => {
92
92
  assertThrows(() => listeners.add(Activity, listenActivity), TypeError, "Listener already set for this type.");
93
93
  });
94
94
 
95
- //#endregion
95
+ //#endregion
96
+ export { };
@@ -1,3 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- globalThis.addEventListener = () => {};
3
+ globalThis.addEventListener = () => {};
4
+ export {};
@@ -7,12 +7,12 @@ import { assertEquals } from "../assert_equals-CTYbeopb.js";
7
7
  import { assert } from "../assert-DmFG7ppO.js";
8
8
  import { assertInstanceOf } from "../assert_instance_of-CF09JHYM.js";
9
9
  import { MemoryKvStore } from "../kv-DohFOP2C.js";
10
- import "../docloader-BpcD_SLO.js";
10
+ import "../docloader-UqcHJRjL.js";
11
11
  import "../url-kTAI6_KP.js";
12
12
  import "../multibase-DeCHcK8L.js";
13
- import { CryptographicKey, Multikey } from "../vocab-DzvTuYjm.js";
13
+ import { CryptographicKey, Multikey } from "../vocab-Cs9KbJAx.js";
14
14
  import "../langstr-DbWheeIS.js";
15
- import { KvKeyCache } from "../keycache-DxrNxDV9.js";
15
+ import { KvKeyCache } from "../keycache-YqFJn7EL.js";
16
16
  import { test } from "../testing-BZ0dJ4qn.js";
17
17
 
18
18
  //#region federation/keycache.test.ts
@@ -57,4 +57,5 @@ test("KvKeyCache.get()", async () => {
57
57
  assertEquals(await cache.get(new URL("https://example.com/null")), null);
58
58
  });
59
59
 
60
- //#endregion
60
+ //#endregion
61
+ export { };
@@ -1,3 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- globalThis.addEventListener = () => {};
3
+ globalThis.addEventListener = () => {};
4
+ export {};
@@ -30,4 +30,5 @@ test("MemoryKvStore", async (t) => {
30
30
  });
31
31
  });
32
32
 
33
- //#endregion
33
+ //#endregion
34
+ export { };
@@ -1,3 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- globalThis.addEventListener = () => {};
3
+ globalThis.addEventListener = () => {};
4
+ export {};
@@ -7,32 +7,32 @@ import { assertEquals } from "../assert_equals-CTYbeopb.js";
7
7
  import { assert } from "../assert-DmFG7ppO.js";
8
8
  import { assertInstanceOf } from "../assert_instance_of-CF09JHYM.js";
9
9
  import { MemoryKvStore } from "../kv-DohFOP2C.js";
10
- import { ContextImpl, FederationImpl, InboxContextImpl, createFederation } from "../middleware-DbABwSSq.js";
11
- import { FetchError, fetchDocumentLoader } from "../docloader-BpcD_SLO.js";
10
+ import { ContextImpl, FederationImpl, InboxContextImpl, createFederation } from "../middleware-D_j7IO2V.js";
11
+ import { FetchError, fetchDocumentLoader } from "../docloader-UqcHJRjL.js";
12
12
  import "../url-kTAI6_KP.js";
13
13
  import "../semver-DWClQt_5.js";
14
- import "../client-BOQZYjsA.js";
14
+ import "../client-Bp-TqQI6.js";
15
15
  import { RouterError } from "../router-D_aVZZUc.js";
16
16
  import "../types-C7C_l-jz.js";
17
17
  import "../multibase-DeCHcK8L.js";
18
- import { Activity, Announce, Create, Invite, Multikey, Note, Object as Object$1, Offer, Person } from "../vocab-DzvTuYjm.js";
18
+ import { Activity, Announce, Create, Invite, Multikey, Note, Object as Object$1, Offer, Person } from "../vocab-Cs9KbJAx.js";
19
19
  import "../langstr-DbWheeIS.js";
20
- import "../lookup-d9KQSGH3.js";
20
+ import "../lookup-DEN8lvde.js";
21
21
  import { getTypeId } from "../type-D2s5lmbZ.js";
22
- import "../actor-CJUOVkus.js";
23
- import "../key-HZNzd-FS.js";
24
- import { signRequest, verifyRequest } from "../http-DEMqisx6.js";
25
- import { getAuthenticatedDocumentLoader } from "../authdocloader-sLr3_CKo.js";
26
- import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-BHlSwz3F.js";
27
- import { doesActorOwnKey } from "../owner-CY_4qryA.js";
28
- import { signObject, verifyObject } from "../proof-NEDLECyh.js";
29
- import { lookupObject } from "../lookup-DZ5JT-dZ.js";
30
- import "../inbox-Dn9cGz72.js";
31
- import "../builder-Dwwf9LZs.js";
22
+ import "../actor-qNVQigMJ.js";
23
+ import "../key-CUEyp_yz.js";
24
+ import { signRequest, verifyRequest } from "../http-DjFoawa6.js";
25
+ import { getAuthenticatedDocumentLoader } from "../authdocloader-DTpSS6vq.js";
26
+ import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-D8WCx-VU.js";
27
+ import { doesActorOwnKey } from "../owner-lYBh2f5Z.js";
28
+ import { signObject, verifyObject } from "../proof-BAoGg0DQ.js";
29
+ import { lookupObject } from "../lookup-DggOHyrB.js";
30
+ import "../inbox-eAHML3xw.js";
31
+ import "../builder-CTAic_n3.js";
32
32
  import "../collection-Dfb0TPno.js";
33
- import "../keycache-DxrNxDV9.js";
33
+ import "../keycache-YqFJn7EL.js";
34
34
  import "../retry-BiIhZWgD.js";
35
- import "../send-BrO7rgzl.js";
35
+ import "../send-CrbpYrfD.js";
36
36
  import { test } from "../testing-BZ0dJ4qn.js";
37
37
  import { assertStrictEquals } from "../std__assert-vp0TKMS1.js";
38
38
  import { assertFalse, assertRejects } from "../assert_rejects-C-sxEMM5.js";
@@ -40,8 +40,8 @@ import "../assert_is_error-nrwA1GeT.js";
40
40
  import { assertNotEquals } from "../assert_not_equals-Dc7y-V5Q.js";
41
41
  import { assertThrows } from "../assert_throws-Cn9C6Jur.js";
42
42
  import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
43
- import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-cVHkVfkB.js";
44
- import { esm_default } from "../esm-CASHO3OR.js";
43
+ import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-Dd_v3HDs.js";
44
+ import { esm_default } from "../esm-Db4De7AS.js";
45
45
 
46
46
  //#region testing/fixtures/example.com/person.json
47
47
  var __context$1 = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"];
@@ -1607,4 +1607,5 @@ test("InboxContextImpl.forwardActivity()", async (t) => {
1607
1607
  esm_default.hardReset();
1608
1608
  });
1609
1609
 
1610
- //#endregion
1610
+ //#endregion
1611
+ export { };
@@ -3,16 +3,16 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
5
  import "../transformers-ghwJuzGY.js";
6
- import "../docloader-D27WkV2-.js";
7
- import "../actor-fvEQljsh.js";
8
- import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-jYmGxpPU.js";
9
- import "../lookup-D1UwpzKL.js";
10
- import "../key-BS8tcPCt.js";
11
- import "../http-hhXcurBA.js";
12
- import "../proof-ZOvHKN5-.js";
6
+ import "../docloader-NmruKwBX.js";
7
+ import "../actor-DY_ediuQ.js";
8
+ import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-mmR5eUDI.js";
9
+ import "../lookup-DHlMvC3Q.js";
10
+ import "../key-B4UFmNvL.js";
11
+ import "../http-XWz7prGl.js";
12
+ import "../proof-CPamyAcG.js";
13
13
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-3B6BDKCK.js";
14
- import "../types-45TSQHsw.js";
15
- import "../authdocloader-UN6bFYqE.js";
16
- import "../vocab-B42jXGwc.js";
14
+ import "../types-Bl1hBU1t.js";
15
+ import "../authdocloader-ColUu5fh.js";
16
+ import "../vocab-DSVoOj6P.js";
17
17
 
18
18
  export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
@@ -1,3 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- globalThis.addEventListener = () => {};
3
+ globalThis.addEventListener = () => {};
4
+ export {};