@fedify/fedify 2.5.0-dev.2420 → 2.5.0-dev.2432

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 (83) hide show
  1. package/dist/{builder-Cwc3Eu59.mjs → builder-nME5sBeL.mjs} +2 -2
  2. package/dist/compat/transformers.test.mjs +1 -1
  3. package/dist/{compound-proof-Dtwrhs1I.mjs → compound-proof-C-tPcb-r.mjs} +2 -2
  4. package/dist/{deno-D4J5fszd.mjs → deno-Cqkt-KD5.mjs} +1 -1
  5. package/dist/{docloader-ChK1DQkj.mjs → docloader-CGBUQXUP.mjs} +5 -3
  6. package/dist/federation/builder.test.mjs +1 -1
  7. package/dist/federation/compound-fanout.test.mjs +3 -3
  8. package/dist/federation/handler-compound-proof.test.mjs +3 -3
  9. package/dist/federation/handler.test.mjs +4 -4
  10. package/dist/federation/hashlink-media.test.mjs +2 -2
  11. package/dist/federation/idempotency.test.mjs +2 -2
  12. package/dist/federation/inbox-report.test.mjs +5 -5
  13. package/dist/federation/inbox.test.mjs +1 -1
  14. package/dist/federation/keycache.test.mjs +20 -9
  15. package/dist/federation/metrics.test.mjs +1 -1
  16. package/dist/federation/middleware.test.mjs +90 -9
  17. package/dist/federation/mod.cjs +1 -1
  18. package/dist/federation/mod.js +1 -1
  19. package/dist/federation/outgoing-proof.test.mjs +4 -4
  20. package/dist/federation/portable-actor.test.mjs +3 -3
  21. package/dist/federation/portable-chain.test.mjs +3 -3
  22. package/dist/federation/portable-collection.test.mjs +4 -4
  23. package/dist/federation/portable-delivery.test.mjs +2 -2
  24. package/dist/federation/portable-gateway-keys.test.mjs +5 -5
  25. package/dist/federation/portable-inbox.test.mjs +4 -4
  26. package/dist/federation/portable-parse-uri.test.mjs +1 -1
  27. package/dist/federation/portable-route-activity.test.mjs +2 -2
  28. package/dist/federation/portable.test.mjs +3 -3
  29. package/dist/federation/send.test.mjs +3 -3
  30. package/dist/federation/tasks/enqueue.test.mjs +1 -1
  31. package/dist/federation/tasks/tasks.test.mjs +2 -2
  32. package/dist/federation/temporal.test.mjs +1 -1
  33. package/dist/federation/webfinger.test.mjs +1 -1
  34. package/dist/{federation-DxQI9dSY.cjs → federation-CM-zrOdz.cjs} +12 -5
  35. package/dist/{http-SBTDzPkh.cjs → http-C88K-3A8.cjs} +17 -3
  36. package/dist/{http-C8rIQ1pK.js → http-KKViNOVp.js} +17 -3
  37. package/dist/{http--kHQomKT.mjs → http-VRVl77qN.mjs} +4 -4
  38. package/dist/{inbox-BGD7K-Ra.mjs → inbox-Blrwn114.mjs} +2 -2
  39. package/dist/{keycache-D-MNltOk.mjs → keycache-N2opu4-3.mjs} +1 -1
  40. package/dist/{kv-cache-DSUypZWS.js → kv-cache-DBnYVLSn.js} +4 -2
  41. package/dist/{kv-cache-B8LMKVe8.mjs → kv-cache-Dt0qeX6M.mjs} +1 -1
  42. package/dist/{kv-cache-Dp_dDR1f.cjs → kv-cache-trql9zWb.cjs} +4 -2
  43. package/dist/{ld-BeBdBDAY.mjs → ld-C13upTHv.mjs} +18 -4
  44. package/dist/{metrics-Dtb81JxK.mjs → metrics-Ci3oTjhF.mjs} +1 -1
  45. package/dist/{middleware-DNjv5rBL.js → middleware-Ckc0daKd.js} +12 -5
  46. package/dist/{middleware-DhI-75xh.mjs → middleware-CzicgguP.mjs} +1 -1
  47. package/dist/{middleware-rQqAHzIo.mjs → middleware-Defzf-30.mjs} +23 -16
  48. package/dist/mod.cjs +4 -4
  49. package/dist/mod.js +4 -4
  50. package/dist/nodeinfo/handler.test.mjs +1 -1
  51. package/dist/{owner-u_-HQrgE.mjs → owner-BBB-PayE.mjs} +3 -3
  52. package/dist/{portable-collection-B-x4XwxP.cjs → portable-collection-Byajf90m.cjs} +1 -1
  53. package/dist/{portable-collection-BKkTJQTd.mjs → portable-collection-DKs8iX1J.mjs} +2 -2
  54. package/dist/{portable-collection-DReoGwZQ.js → portable-collection-sJBoBful.js} +1 -1
  55. package/dist/{portable-key-Bkm6sXJB.mjs → portable-key-zbE5iDhv.mjs} +1 -1
  56. package/dist/{proof-DOV4ZiAo.mjs → proof-DdI4I2Jg.mjs} +3 -3
  57. package/dist/{send-C_Fffu0I.mjs → send-DDSpf_ym.mjs} +3 -3
  58. package/dist/sig/compound-proof-discovery.test.mjs +1 -1
  59. package/dist/sig/compound-proof-producer.test.mjs +1 -1
  60. package/dist/sig/compound-proof-verification.test.mjs +2 -2
  61. package/dist/sig/compound-proof.test.mjs +2 -2
  62. package/dist/sig/http.test.mjs +3 -3
  63. package/dist/sig/key.test.mjs +196 -1
  64. package/dist/sig/ld.test.mjs +46 -1
  65. package/dist/sig/mitra-receive-interop.test.mjs +4 -4
  66. package/dist/sig/mitra-send-interop.test.mjs +3 -3
  67. package/dist/sig/mod.cjs +2 -2
  68. package/dist/sig/mod.js +2 -2
  69. package/dist/sig/owner.test.mjs +46 -1
  70. package/dist/sig/portable-collection.test.mjs +1 -1
  71. package/dist/sig/portable-interop.test.mjs +3 -3
  72. package/dist/sig/portable-key.test.mjs +6 -6
  73. package/dist/sig/proof.test.mjs +54 -3
  74. package/dist/sig/tootik-request-interop.test.mjs +4 -4
  75. package/dist/sig/tootik-send-interop.test.mjs +3 -3
  76. package/dist/sig/verification.test.mjs +3 -3
  77. package/dist/{temporal-BRgOZRRr.mjs → temporal-CGJWetE6.mjs} +1 -1
  78. package/dist/testing/kv.test.mjs +1 -1
  79. package/dist/utils/docloader.test.mjs +66 -2
  80. package/dist/utils/kv-cache.test.mjs +1 -1
  81. package/dist/utils/mod.cjs +1 -1
  82. package/dist/utils/mod.js +1 -1
  83. package/package.json +6 -6
@@ -11,10 +11,10 @@ import { t as assertNotEquals } from "../assert_not_equals-CpPK2t89.mjs";
11
11
  import "../std__assert-DvMDRPes.mjs";
12
12
  import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
13
13
  import { t as assert } from "../assert-D1Eafmd_.mjs";
14
- import { f as verifyRequest } from "../http--kHQomKT.mjs";
14
+ import { f as verifyRequest } from "../http-VRVl77qN.mjs";
15
15
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
16
- import { t as doesActorOwnKey } from "../owner-u_-HQrgE.mjs";
17
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-C_Fffu0I.mjs";
16
+ import { t as doesActorOwnKey } from "../owner-BBB-PayE.mjs";
17
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-DDSpf_ym.mjs";
18
18
  import { t as FedifySpanExporter } from "../exporter-DThFfe7P.mjs";
19
19
  import { configure, getLogger, reset, withContext } from "@logtape/logtape";
20
20
  import { Activity, Application, Endpoints, Group, Person, Service } from "@fedify/vocab";
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
4
4
  import { t as MemoryKvStore } from "../../kv-DCHkaJ9-.mjs";
5
5
  import { a as numberSchema, i as makeSchema, n as baseOptions, o as stringSchema, t as MockQueue } from "../../tasks-IG3pHfvZ.mjs";
6
6
  import "../../testing-t8xDeJZ5.mjs";
7
- import { o as createFederation } from "../../middleware-rQqAHzIo.mjs";
7
+ import { o as createFederation } from "../../middleware-Defzf-30.mjs";
8
8
  import { n as ParallelMessageQueue } from "../../mq-Dm1Wmtm-.mjs";
9
9
  import { configure, reset } from "@logtape/logtape";
10
10
  import { delay } from "es-toolkit";
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
4
4
  import { t as MemoryKvStore } from "../../kv-DCHkaJ9-.mjs";
5
5
  import { a as numberSchema, i as makeSchema, n as baseOptions, o as stringSchema, t as MockQueue } from "../../tasks-IG3pHfvZ.mjs";
6
6
  import "../../testing-t8xDeJZ5.mjs";
7
- import { o as createFederation } from "../../middleware-rQqAHzIo.mjs";
8
- import { r as createFederationBuilder } from "../../builder-Cwc3Eu59.mjs";
7
+ import { o as createFederation } from "../../middleware-Defzf-30.mjs";
8
+ import { r as createFederationBuilder } from "../../builder-nME5sBeL.mjs";
9
9
  import { t as TaskCodec } from "../../codec-C6rTrpIp.mjs";
10
10
  import { t as InProcessMessageQueue } from "../../mq-Dm1Wmtm-.mjs";
11
11
  import { W3CTraceContextPropagator } from "@opentelemetry/core";
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
5
5
  import "../std__assert-DvMDRPes.mjs";
6
6
  import { t as assert } from "../assert-D1Eafmd_.mjs";
7
- import { t as hasMalformedKnownTemporalLiteral } from "../temporal-BRgOZRRr.mjs";
7
+ import { t as hasMalformedKnownTemporalLiteral } from "../temporal-CGJWetE6.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/federation/temporal.test.ts
10
10
  test("hasMalformedKnownTemporalLiteral() detects expanded proof timestamps", async () => {
@@ -6,7 +6,7 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
7
7
  import { t as assertNotEquals } from "../assert_not_equals-CpPK2t89.mjs";
8
8
  import "../std__assert-DvMDRPes.mjs";
9
- import { o as createFederation, s as handleWebFinger } from "../middleware-rQqAHzIo.mjs";
9
+ import { o as createFederation, s as handleWebFinger } from "../middleware-Defzf-30.mjs";
10
10
  import { Image, Link, Person, Tombstone } from "@fedify/vocab";
11
11
  import { parseIri } from "@fedify/vocab-runtime";
12
12
  import { createTestMeterProvider, test } from "@fedify/fixture";
@@ -1,10 +1,10 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-Dmm3t92W.cjs");
3
3
  const require_transformers = require("./transformers-BalCrSsr.cjs");
4
- const require_http = require("./http-SBTDzPkh.cjs");
4
+ const require_http = require("./http-C88K-3A8.cjs");
5
5
  const require_types = require("./types-poIao40f.cjs");
6
- const require_portable_collection = require("./portable-collection-B-x4XwxP.cjs");
7
- const require_kv_cache = require("./kv-cache-Dp_dDR1f.cjs");
6
+ const require_portable_collection = require("./portable-collection-Byajf90m.cjs");
7
+ const require_kv_cache = require("./kv-cache-trql9zWb.cjs");
8
8
  let _logtape_logtape = require("@logtape/logtape");
9
9
  let _fedify_uri_template = require("@fedify/uri-template");
10
10
  let _fedify_vocab = require("@fedify/vocab");
@@ -2986,7 +2986,7 @@ async function routeActivity({ context: ctx, json, originalJson, normalizedActiv
2986
2986
  //#endregion
2987
2987
  //#region src/federation/keycache.ts
2988
2988
  const Temporal$9 = require_http.Temporal;
2989
- const KEY_CACHE_GENERATION = "2";
2989
+ const KEY_CACHE_GENERATION = "3";
2990
2990
  const COMPATIBLE_KEY_SEGMENT = "__compatible";
2991
2991
  const MAX_OWNER_BYTES = 32 * 1024;
2992
2992
  function isCompatibleKeyEntry(value) {
@@ -11696,6 +11696,12 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
11696
11696
  #signedKey = void 0;
11697
11697
  async getSignedKey(options = {}) {
11698
11698
  if (this.#signedKey != null) return this.#signedKey;
11699
+ const keyCache = new KvKeyCache(this.federation.kv, this.federation.kvPrefixes.publicKey, {
11700
+ documentLoader: options.documentLoader ?? this.documentLoader,
11701
+ contextLoader: options.contextLoader ?? this.contextLoader,
11702
+ tracerProvider: options.tracerProvider ?? this.tracerProvider,
11703
+ keyTtl: this.federation.publicKeyTtl
11704
+ });
11699
11705
  return this.#signedKey = await require_http.verifyRequest(this.request, {
11700
11706
  ...this,
11701
11707
  contextLoader: options.contextLoader ?? this.contextLoader,
@@ -11703,7 +11709,8 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
11703
11709
  timeWindow: this.federation.signatureTimeWindow,
11704
11710
  maxSignatures: this.federation.maxHttpSignatures,
11705
11711
  meterProvider: this.meterProvider,
11706
- tracerProvider: options.tracerProvider ?? this.tracerProvider
11712
+ tracerProvider: options.tracerProvider ?? this.tracerProvider,
11713
+ keyCache
11707
11714
  });
11708
11715
  }
11709
11716
  #signedKeyOwner = void 0;
@@ -17,7 +17,7 @@ json_canon = require_rolldown_runtime.__toESM(json_canon, 1);
17
17
  let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
18
18
  //#region deno.json
19
19
  var name = "@fedify/fedify";
20
- var version = "2.5.0-dev.2420+4db1db92";
20
+ var version = "2.5.0-dev.2432+f56118e1";
21
21
  //#endregion
22
22
  //#region src/sig/portable-key-id.ts
23
23
  const COMPATIBLE_KEY_ID_PATH_PATTERN = /^\/\.well-known\/apgateway\/did(?::|%3A)/i;
@@ -5138,16 +5138,23 @@ async function importJwk(jwk, type) {
5138
5138
  /**
5139
5139
  * Fetches the document that the given actor URI dereferences to, and returns
5140
5140
  * the actor only if the host that served the document is authoritative for
5141
- * the id the document claims.
5141
+ * the id the document claims, and that id is the actor that was asked for.
5142
5142
  *
5143
5143
  * Only the origin that serves an actor id can speak for it. Without that
5144
5144
  * rule any host could serve a document describing somebody else's actor—and
5145
5145
  * listing its own keys as that actor's.
5146
5146
  *
5147
+ * The returned actor always has exactly the requested `actorId` as its `id`.
5148
+ * A document loader follows redirects and alternate document links, so the
5149
+ * document an actor id leads to may describe a different actor altogether,
5150
+ * on the same origin or on another; accepting it would attribute that other
5151
+ * actor's keys to the requested one. See GHSA-8863-8468-7hq7.
5152
+ *
5147
5153
  * @param actorId The URI of the actor to fetch.
5148
5154
  * @param options Options for fetching the document.
5149
5155
  * @returns The actor, or `null` if the document cannot be fetched, is not an
5150
- * actor, or belongs to another origin.
5156
+ * actor, belongs to another origin, or describes an actor other
5157
+ * than the requested one.
5151
5158
  * @internal
5152
5159
  */
5153
5160
  async function fetchActorDocument(actorId, options = {}) {
@@ -5213,6 +5220,13 @@ async function fetchActorDocumentInternal(actorId, options, propagateContextFetc
5213
5220
  });
5214
5221
  return null;
5215
5222
  }
5223
+ if (object.id.href !== actorId.href) {
5224
+ logger.debug("The document fetched for the actor {actorId} is the actor {documentActorId} instead; refusing to treat it as the requested actor's document.", {
5225
+ actorId: actorId.href,
5226
+ documentActorId: object.id.href
5227
+ });
5228
+ return null;
5229
+ }
5216
5230
  return object;
5217
5231
  }
5218
5232
  /**
@@ -15,7 +15,7 @@ import serialize from "json-canon";
15
15
  import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
16
16
  //#region deno.json
17
17
  var name = "@fedify/fedify";
18
- var version = "2.5.0-dev.2420+4db1db92";
18
+ var version = "2.5.0-dev.2432+f56118e1";
19
19
  //#endregion
20
20
  //#region src/sig/portable-key-id.ts
21
21
  const COMPATIBLE_KEY_ID_PATH_PATTERN = /^\/\.well-known\/apgateway\/did(?::|%3A)/i;
@@ -1570,16 +1570,23 @@ async function importJwk(jwk, type) {
1570
1570
  /**
1571
1571
  * Fetches the document that the given actor URI dereferences to, and returns
1572
1572
  * the actor only if the host that served the document is authoritative for
1573
- * the id the document claims.
1573
+ * the id the document claims, and that id is the actor that was asked for.
1574
1574
  *
1575
1575
  * Only the origin that serves an actor id can speak for it. Without that
1576
1576
  * rule any host could serve a document describing somebody else's actor—and
1577
1577
  * listing its own keys as that actor's.
1578
1578
  *
1579
+ * The returned actor always has exactly the requested `actorId` as its `id`.
1580
+ * A document loader follows redirects and alternate document links, so the
1581
+ * document an actor id leads to may describe a different actor altogether,
1582
+ * on the same origin or on another; accepting it would attribute that other
1583
+ * actor's keys to the requested one. See GHSA-8863-8468-7hq7.
1584
+ *
1579
1585
  * @param actorId The URI of the actor to fetch.
1580
1586
  * @param options Options for fetching the document.
1581
1587
  * @returns The actor, or `null` if the document cannot be fetched, is not an
1582
- * actor, or belongs to another origin.
1588
+ * actor, belongs to another origin, or describes an actor other
1589
+ * than the requested one.
1583
1590
  * @internal
1584
1591
  */
1585
1592
  async function fetchActorDocument(actorId, options = {}) {
@@ -1645,6 +1652,13 @@ async function fetchActorDocumentInternal(actorId, options, propagateContextFetc
1645
1652
  });
1646
1653
  return null;
1647
1654
  }
1655
+ if (object.id.href !== actorId.href) {
1656
+ logger.debug("The document fetched for the actor {actorId} is the actor {documentActorId} instead; refusing to treat it as the requested actor's document.", {
1657
+ actorId: actorId.href,
1658
+ documentActorId: object.id.href
1659
+ });
1660
+ return null;
1661
+ }
1648
1662
  return object;
1649
1663
  }
1650
1664
  /**
@@ -3,12 +3,12 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { m as parseKeyIdString } from "./portable-key-id-Ca30-hOa.mjs";
5
5
  import { a as verificationObservation, i as triedKey, n as observeCheck, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
6
- import { n as version, t as name } from "./deno-D4J5fszd.mjs";
7
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-Dtb81JxK.mjs";
6
+ import { n as version, t as name } from "./deno-Cqkt-KD5.mjs";
7
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-Ci3oTjhF.mjs";
8
8
  import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature } from "./accept-CPVqki78.mjs";
9
9
  import { a as promoteKeyOwnerEvidence } from "./key-owner-evidence-APB6NpSk.mjs";
10
- import { S as fetchKeyDetailed, T as validateCryptoKey, v as bypassKeyCacheReads } from "./ld-BeBdBDAY.mjs";
11
- import { n as resolvePortableActorKey, r as verifyPortableGatewayKeyDocument } from "./portable-key-Bkm6sXJB.mjs";
10
+ import { S as fetchKeyDetailed, T as validateCryptoKey, v as bypassKeyCacheReads } from "./ld-C13upTHv.mjs";
11
+ import { n as resolvePortableActorKey, r as verifyPortableGatewayKeyDocument } from "./portable-key-zbE5iDhv.mjs";
12
12
  import { getLogger } from "@logtape/logtape";
13
13
  import { CryptographicKey } from "@fedify/vocab";
14
14
  import { SpanStatusCode, trace } from "@opentelemetry/api";
@@ -2,8 +2,8 @@ import { Temporal } from "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as getAuthenticationOrigin } from "./portable-key-id-Ca30-hOa.mjs";
5
- import { n as version, t as name } from "./deno-D4J5fszd.mjs";
6
- import { g as recordInboxActivity, n as getDurationMs, r as getFederationMetrics } from "./metrics-Dtb81JxK.mjs";
5
+ import { n as version, t as name } from "./deno-Cqkt-KD5.mjs";
6
+ import { g as recordInboxActivity, n as getDurationMs, r as getFederationMetrics } from "./metrics-Ci3oTjhF.mjs";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  import { getTypeId } from "@fedify/vocab";
9
9
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -5,7 +5,7 @@ import { t as MAX_PORTABLE_KEY_TTL } from "./key-owner-evidence-APB6NpSk.mjs";
5
5
  import { CryptographicKey, Multikey } from "@fedify/vocab";
6
6
  import { FetchError, UrlError } from "@fedify/vocab-runtime";
7
7
  //#region src/federation/keycache.ts
8
- const KEY_CACHE_GENERATION = "2";
8
+ const KEY_CACHE_GENERATION = "3";
9
9
  const COMPATIBLE_KEY_SEGMENT = "__compatible";
10
10
  const MAX_OWNER_BYTES = 32 * 1024;
11
11
  function isCompatibleKeyEntry(value) {
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { ct as recordDocumentCache, q as validateCryptoKey, t as doubleKnock } from "./http-C8rIQ1pK.js";
3
+ import { ct as recordDocumentCache, q as validateCryptoKey, t as doubleKnock } from "./http-KKViNOVp.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, resolveDocumentLoaderTimeout, validatePublicUrl, withDocumentLoaderTimeout } from "@fedify/vocab-runtime";
6
6
  import { curry } from "es-toolkit";
@@ -62,8 +62,10 @@ function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, maxRedi
62
62
  }, options);
63
63
  }
64
64
  async function validateUrl(url, options) {
65
- const protocol = new URL(url).protocol;
65
+ const parsedUrl = new URL(url);
66
+ const protocol = parsedUrl.protocol;
66
67
  if (protocol !== "http:" && protocol !== "https:") throw new UrlError(`Unsupported protocol: ${protocol}`);
68
+ if (parsedUrl.username !== "" || parsedUrl.password !== "") throw new UrlError("URLs with credentials are not allowed");
67
69
  if (!allowPrivateAddress) {
68
70
  try {
69
71
  await validatePublicUrl(url);
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { p as recordDocumentCache } from "./metrics-Dtb81JxK.mjs";
4
+ import { p as recordDocumentCache } from "./metrics-Ci3oTjhF.mjs";
5
5
  import { getLogger } from "@logtape/logtape";
6
6
  import { preloadedContexts } from "@fedify/vocab-runtime";
7
7
  //#region src/utils/kv-cache.ts
@@ -1,5 +1,5 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
- const require_http = require("./http-SBTDzPkh.cjs");
2
+ const require_http = require("./http-C88K-3A8.cjs");
3
3
  let _logtape_logtape = require("@logtape/logtape");
4
4
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
5
5
  let es_toolkit = require("es-toolkit");
@@ -61,8 +61,10 @@ function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, maxRedi
61
61
  }, options);
62
62
  }
63
63
  async function validateUrl(url, options) {
64
- const protocol = new URL(url).protocol;
64
+ const parsedUrl = new URL(url);
65
+ const protocol = parsedUrl.protocol;
65
66
  if (protocol !== "http:" && protocol !== "https:") throw new _fedify_vocab_runtime.UrlError(`Unsupported protocol: ${protocol}`);
67
+ if (parsedUrl.username !== "" || parsedUrl.password !== "") throw new _fedify_vocab_runtime.UrlError("URLs with credentials are not allowed");
66
68
  if (!allowPrivateAddress) {
67
69
  try {
68
70
  await (0, _fedify_vocab_runtime.validatePublicUrl)(url);
@@ -3,8 +3,8 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { c as isPortableActorDocument, d as isPortableUri, l as isPortableId, m as parseKeyIdString, s as isCompatibleKeyId } from "./portable-key-id-Ca30-hOa.mjs";
5
5
  import { a as verificationObservation, i as triedKey, n as observeCheck, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
6
- import { n as version, t as name } from "./deno-D4J5fszd.mjs";
7
- import { _ as recordKeyLookup, n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch, t as classifyFetchError } from "./metrics-Dtb81JxK.mjs";
6
+ import { n as version, t as name } from "./deno-Cqkt-KD5.mjs";
7
+ import { _ as recordKeyLookup, n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch, t as classifyFetchError } from "./metrics-Ci3oTjhF.mjs";
8
8
  import { n as attachKeyOwnerEvidence, t as MAX_PORTABLE_KEY_TTL } from "./key-owner-evidence-APB6NpSk.mjs";
9
9
  import { getLogger } from "@logtape/logtape";
10
10
  import { Activity, CryptographicKey, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
@@ -154,16 +154,23 @@ async function importJwk(jwk, type) {
154
154
  /**
155
155
  * Fetches the document that the given actor URI dereferences to, and returns
156
156
  * the actor only if the host that served the document is authoritative for
157
- * the id the document claims.
157
+ * the id the document claims, and that id is the actor that was asked for.
158
158
  *
159
159
  * Only the origin that serves an actor id can speak for it. Without that
160
160
  * rule any host could serve a document describing somebody else's actor—and
161
161
  * listing its own keys as that actor's.
162
162
  *
163
+ * The returned actor always has exactly the requested `actorId` as its `id`.
164
+ * A document loader follows redirects and alternate document links, so the
165
+ * document an actor id leads to may describe a different actor altogether,
166
+ * on the same origin or on another; accepting it would attribute that other
167
+ * actor's keys to the requested one. See GHSA-8863-8468-7hq7.
168
+ *
163
169
  * @param actorId The URI of the actor to fetch.
164
170
  * @param options Options for fetching the document.
165
171
  * @returns The actor, or `null` if the document cannot be fetched, is not an
166
- * actor, or belongs to another origin.
172
+ * actor, belongs to another origin, or describes an actor other
173
+ * than the requested one.
167
174
  * @internal
168
175
  */
169
176
  async function fetchActorDocument(actorId, options = {}) {
@@ -229,6 +236,13 @@ async function fetchActorDocumentInternal(actorId, options, propagateContextFetc
229
236
  });
230
237
  return null;
231
238
  }
239
+ if (object.id.href !== actorId.href) {
240
+ logger.debug("The document fetched for the actor {actorId} is the actor {documentActorId} instead; refusing to treat it as the requested actor's document.", {
241
+ actorId: actorId.href,
242
+ documentActorId: object.id.href
243
+ });
244
+ return null;
245
+ }
232
246
  return object;
233
247
  }
234
248
  /**
@@ -1,7 +1,7 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-D4J5fszd.mjs";
4
+ import { n as version, t as name } from "./deno-Cqkt-KD5.mjs";
5
5
  import { metrics } from "@opentelemetry/api";
6
6
  import { FetchError } from "@fedify/vocab-runtime";
7
7
  //#region src/federation/metrics.ts
@@ -2,10 +2,10 @@ import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./rolldown-runtime-BC-Eo5Mj.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-DAtXl_Kc.js";
5
- import { $ as getFederationMetrics, A as detachSignature, At as isPortableId, B as wrapContextLoaderForJsonLd, Ct as getAuthenticationOrigin, Dt as getRawCanonicalPortableId, E as assertSafeJsonLd, Et as getPortableDid, F as isInvalidUrlTypeError, Ft as name, I as signJsonLd, It as version, K as importJwk, L as verifyCompactJsonLd, M as hasSignature, Mt as isPortableUri, N as hasSignatureLike, Nt as isSameObjectId, O as compactJsonLd, Ot as hasPortableActor, P as isClearlyMalformedContextReference, Q as getDurationMs, S as verifyPreparedPortableObjectProofPolicy, St as verificationObservation, T as InvalidContextReferenceError, Tt as getGatewayKeyBase, V as exportJwk, Y as MAX_PORTABLE_KEY_TTL, _ as verifyMapLocalProof, at as recordCollectionPageItems, b as verifyPortableObjectProofPolicy, bt as observeAttempt, c as verifyRequestDetailed, d as InvalidPortableObjectIdError, dt as recordOutboxActivity, et as getRemoteHost, f as classifyFep2277CoreType, ft as recordOutboxEnqueue, g as signObject, gt as formatAcceptSignature, h as preparePortableObjectProofPolicy, ht as preloadedOnlyDocumentLoader, i as selectRequestSignature, it as recordCollectionDispatchDuration, j as getNormalizationContextLoader, jt as isPortableKeyId, kt as isCompatibleKeyId, lt as recordFanoutRecipients, m as hasProofLike, mt as registerQueueDepthGauge, n as listRequestSignatures, nt as isAbortError, o as validateMaxSignatures, ot as recordCollectionRequest, pt as recordWebFingerHandle, q as validateCryptoKey, r as parseRfc9421SignatureInput, rt as recordCircuitBreakerStateChange, s as verifyRequest, st as recordCollectionTotalItems, t as doubleKnock, tt as instrumentDocumentLoader, ut as recordInboxActivity, v as verifyObject, w as normalizeOutgoingActivityJsonLd, wt as getCanonicalPortableId, x as verifyPortableObjectProofWithRoot, xt as snapshotKey, y as verifyPortableObjectProof } from "./http-C8rIQ1pK.js";
5
+ import { $ as getFederationMetrics, A as detachSignature, At as isPortableId, B as wrapContextLoaderForJsonLd, Ct as getAuthenticationOrigin, Dt as getRawCanonicalPortableId, E as assertSafeJsonLd, Et as getPortableDid, F as isInvalidUrlTypeError, Ft as name, I as signJsonLd, It as version, K as importJwk, L as verifyCompactJsonLd, M as hasSignature, Mt as isPortableUri, N as hasSignatureLike, Nt as isSameObjectId, O as compactJsonLd, Ot as hasPortableActor, P as isClearlyMalformedContextReference, Q as getDurationMs, S as verifyPreparedPortableObjectProofPolicy, St as verificationObservation, T as InvalidContextReferenceError, Tt as getGatewayKeyBase, V as exportJwk, Y as MAX_PORTABLE_KEY_TTL, _ as verifyMapLocalProof, at as recordCollectionPageItems, b as verifyPortableObjectProofPolicy, bt as observeAttempt, c as verifyRequestDetailed, d as InvalidPortableObjectIdError, dt as recordOutboxActivity, et as getRemoteHost, f as classifyFep2277CoreType, ft as recordOutboxEnqueue, g as signObject, gt as formatAcceptSignature, h as preparePortableObjectProofPolicy, ht as preloadedOnlyDocumentLoader, i as selectRequestSignature, it as recordCollectionDispatchDuration, j as getNormalizationContextLoader, jt as isPortableKeyId, kt as isCompatibleKeyId, lt as recordFanoutRecipients, m as hasProofLike, mt as registerQueueDepthGauge, n as listRequestSignatures, nt as isAbortError, o as validateMaxSignatures, ot as recordCollectionRequest, pt as recordWebFingerHandle, q as validateCryptoKey, r as parseRfc9421SignatureInput, rt as recordCircuitBreakerStateChange, s as verifyRequest, st as recordCollectionTotalItems, t as doubleKnock, tt as instrumentDocumentLoader, ut as recordInboxActivity, v as verifyObject, w as normalizeOutgoingActivityJsonLd, wt as getCanonicalPortableId, x as verifyPortableObjectProofWithRoot, xt as snapshotKey, y as verifyPortableObjectProof } from "./http-KKViNOVp.js";
6
6
  import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-_S2_MeLF.js";
7
- import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-DReoGwZQ.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DSUypZWS.js";
7
+ import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-sJBoBful.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DBnYVLSn.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { Router, RouterError, assertPath } from "@fedify/uri-template";
11
11
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, PUBLIC_COLLECTION, Tombstone, getTypeId, isActor, lookupObject, traverseCollection } from "@fedify/vocab";
@@ -2983,7 +2983,7 @@ async function routeActivity({ context: ctx, json, originalJson, normalizedActiv
2983
2983
  }
2984
2984
  //#endregion
2985
2985
  //#region src/federation/keycache.ts
2986
- const KEY_CACHE_GENERATION = "2";
2986
+ const KEY_CACHE_GENERATION = "3";
2987
2987
  const COMPATIBLE_KEY_SEGMENT = "__compatible";
2988
2988
  const MAX_OWNER_BYTES = 32 * 1024;
2989
2989
  function isCompatibleKeyEntry(value) {
@@ -11599,6 +11599,12 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
11599
11599
  #signedKey = void 0;
11600
11600
  async getSignedKey(options = {}) {
11601
11601
  if (this.#signedKey != null) return this.#signedKey;
11602
+ const keyCache = new KvKeyCache(this.federation.kv, this.federation.kvPrefixes.publicKey, {
11603
+ documentLoader: options.documentLoader ?? this.documentLoader,
11604
+ contextLoader: options.contextLoader ?? this.contextLoader,
11605
+ tracerProvider: options.tracerProvider ?? this.tracerProvider,
11606
+ keyTtl: this.federation.publicKeyTtl
11607
+ });
11602
11608
  return this.#signedKey = await verifyRequest(this.request, {
11603
11609
  ...this,
11604
11610
  contextLoader: options.contextLoader ?? this.contextLoader,
@@ -11606,7 +11612,8 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
11606
11612
  timeWindow: this.federation.signatureTimeWindow,
11607
11613
  maxSignatures: this.federation.maxHttpSignatures,
11608
11614
  meterProvider: this.meterProvider,
11609
- tracerProvider: options.tracerProvider ?? this.tracerProvider
11615
+ tracerProvider: options.tracerProvider ?? this.tracerProvider,
11616
+ keyCache
11610
11617
  });
11611
11618
  }
11612
11619
  #signedKeyOwner = void 0;
@@ -1,5 +1,5 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as FederationImpl } from "./middleware-rQqAHzIo.mjs";
4
+ import { n as FederationImpl } from "./middleware-Defzf-30.mjs";
5
5
  export { FederationImpl };
@@ -4,28 +4,28 @@ globalThis.addEventListener = () => {};
4
4
  import { d as isPortableUri, f as isSameObjectId, i as getPortableDid, l as isPortableId, n as getCanonicalPortableId, o as hasPortableActor, r as getGatewayKeyBase, s as isCompatibleKeyId, t as getAuthenticationOrigin, u as isPortableKeyId } from "./portable-key-id-Ca30-hOa.mjs";
5
5
  import { n as isPubliclyAddressedNode, t as isInAudience } from "./audience-CHQ-FlLD.mjs";
6
6
  import { a as verificationObservation, r as snapshotKey, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
7
- import { n as version, t as name } from "./deno-D4J5fszd.mjs";
8
- import { a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, n as getDurationMs, o as isAbortError, r as getFederationMetrics, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "./metrics-Dtb81JxK.mjs";
7
+ import { n as version, t as name } from "./deno-Cqkt-KD5.mjs";
8
+ import { a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, n as getDurationMs, o as isAbortError, r as getFederationMetrics, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "./metrics-Ci3oTjhF.mjs";
9
9
  import { t as formatAcceptSignature } from "./accept-CPVqki78.mjs";
10
- import { T as validateCryptoKey, _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike, w as importJwk, y as exportJwk } from "./ld-BeBdBDAY.mjs";
10
+ import { T as validateCryptoKey, _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike, w as importJwk, y as exportJwk } from "./ld-C13upTHv.mjs";
11
11
  import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-4IJqPYos.mjs";
12
- import { c as verifyObject, d as verifyPortableObjectProofWithRoot, i as hasProofLike, l as verifyPortableObjectProof, o as signObject, t as InvalidPortableObjectIdError } from "./proof-DOV4ZiAo.mjs";
13
- import { a as listRequestSignatures, c as selectRequestSignature, d as validateMaxSignatures, f as verifyRequest, p as verifyRequestDetailed, s as parseRfc9421SignatureInput } from "./http--kHQomKT.mjs";
14
- import { t as getAuthenticatedDocumentLoader } from "./docloader-ChK1DQkj.mjs";
15
- import { n as kvCache } from "./kv-cache-B8LMKVe8.mjs";
12
+ import { c as verifyObject, d as verifyPortableObjectProofWithRoot, i as hasProofLike, l as verifyPortableObjectProof, o as signObject, t as InvalidPortableObjectIdError } from "./proof-DdI4I2Jg.mjs";
13
+ import { a as listRequestSignatures, c as selectRequestSignature, d as validateMaxSignatures, f as verifyRequest, p as verifyRequestDetailed, s as parseRfc9421SignatureInput } from "./http-VRVl77qN.mjs";
14
+ import { t as getAuthenticatedDocumentLoader } from "./docloader-CGBUQXUP.mjs";
15
+ import { n as kvCache } from "./kv-cache-Dt0qeX6M.mjs";
16
16
  import { d as readBoundedText, l as BodyTooLargeError, t as getNodeInfo, u as MAX_BODY_SIZE } from "./client-CEnNz8O7.mjs";
17
17
  import { t as nodeInfoToJson } from "./types-DE_LV1JB.mjs";
18
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-u_-HQrgE.mjs";
19
- import { t as verifyPortableObject } from "./portable-collection-BKkTJQTd.mjs";
20
- import { a as getOrderingDestination, i as sendActivityThroughGateways, n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-C_Fffu0I.mjs";
21
- import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-Cwc3Eu59.mjs";
18
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-BBB-PayE.mjs";
19
+ import { t as verifyPortableObject } from "./portable-collection-DKs8iX1J.mjs";
20
+ import { a as getOrderingDestination, i as sendActivityThroughGateways, n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-DDSpf_ym.mjs";
21
+ import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-nME5sBeL.mjs";
22
22
  import { t as CircuitBreaker } from "./circuit-breaker-XJ53md4S.mjs";
23
23
  import { t as buildCollectionSynchronizationHeader } from "./collection-CnnP1UAv.mjs";
24
- import { a as inspectCompoundPortableObjectApplicability, c as verifyServedPortableObjects, i as findUnsupportedCompoundProofShape, o as verifyCompoundPortableObjectProofs, r as findEmbeddedProofWithoutContext, t as containsCompoundPortableObject } from "./compound-proof-Dtwrhs1I.mjs";
25
- import { n as routeActivity, t as actorsHaveSameOrigin } from "./inbox-BGD7K-Ra.mjs";
26
- import { t as KvKeyCache } from "./keycache-D-MNltOk.mjs";
24
+ import { a as inspectCompoundPortableObjectApplicability, c as verifyServedPortableObjects, i as findUnsupportedCompoundProofShape, o as verifyCompoundPortableObjectProofs, r as findEmbeddedProofWithoutContext, t as containsCompoundPortableObject } from "./compound-proof-C-tPcb-r.mjs";
25
+ import { n as routeActivity, t as actorsHaveSameOrigin } from "./inbox-Blrwn114.mjs";
26
+ import { t as KvKeyCache } from "./keycache-N2opu4-3.mjs";
27
27
  import { t as acceptsJsonLd } from "./negotiation-CCocWT_N.mjs";
28
- import { t as hasMalformedKnownTemporalLiteral } from "./temporal-BRgOZRRr.mjs";
28
+ import { t as hasMalformedKnownTemporalLiteral } from "./temporal-CGJWetE6.mjs";
29
29
  import { t as createExponentialBackoffPolicy } from "./retry-zX5xw5e0.mjs";
30
30
  import { t as TaskCodec } from "./codec-C6rTrpIp.mjs";
31
31
  import { getLogger, withContext } from "@logtape/logtape";
@@ -7966,6 +7966,12 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
7966
7966
  #signedKey = void 0;
7967
7967
  async getSignedKey(options = {}) {
7968
7968
  if (this.#signedKey != null) return this.#signedKey;
7969
+ const keyCache = new KvKeyCache(this.federation.kv, this.federation.kvPrefixes.publicKey, {
7970
+ documentLoader: options.documentLoader ?? this.documentLoader,
7971
+ contextLoader: options.contextLoader ?? this.contextLoader,
7972
+ tracerProvider: options.tracerProvider ?? this.tracerProvider,
7973
+ keyTtl: this.federation.publicKeyTtl
7974
+ });
7969
7975
  return this.#signedKey = await verifyRequest(this.request, {
7970
7976
  ...this,
7971
7977
  contextLoader: options.contextLoader ?? this.contextLoader,
@@ -7973,7 +7979,8 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
7973
7979
  timeWindow: this.federation.signatureTimeWindow,
7974
7980
  maxSignatures: this.federation.maxHttpSignatures,
7975
7981
  meterProvider: this.meterProvider,
7976
- tracerProvider: options.tracerProvider ?? this.tracerProvider
7982
+ tracerProvider: options.tracerProvider ?? this.tracerProvider,
7983
+ keyCache
7977
7984
  });
7978
7985
  }
7979
7986
  #signedKeyOwner = void 0;
package/dist/mod.cjs CHANGED
@@ -3,11 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("./rolldown-runtime-Dmm3t92W.cjs");
4
4
  const require_transformers = require("./transformers-BalCrSsr.cjs");
5
5
  require("./compat/mod.cjs");
6
- const require_http = require("./http-SBTDzPkh.cjs");
7
- const require_federation = require("./federation-DxQI9dSY.cjs");
6
+ const require_http = require("./http-C88K-3A8.cjs");
7
+ const require_federation = require("./federation-CM-zrOdz.cjs");
8
8
  const require_types = require("./types-poIao40f.cjs");
9
- const require_portable_collection = require("./portable-collection-B-x4XwxP.cjs");
10
- const require_kv_cache = require("./kv-cache-Dp_dDR1f.cjs");
9
+ const require_portable_collection = require("./portable-collection-Byajf90m.cjs");
10
+ const require_kv_cache = require("./kv-cache-trql9zWb.cjs");
11
11
  require("./nodeinfo/mod.cjs");
12
12
  require("./runtime/mod.cjs");
13
13
  require("./sig/mod.cjs");
package/dist/mod.js CHANGED
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import "./rolldown-runtime-BC-Eo5Mj.js";
4
4
  import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-DAtXl_Kc.js";
5
5
  import "./compat/mod.js";
6
- import { A as detachSignature, C as verifyProof, D as attachSignature, G as generateCryptoKeyPair, I as signJsonLd, K as importJwk, N as hasSignatureLike, R as verifyJsonLd, U as fetchKey, V as exportJwk, W as fetchKeyDetailed, _t as fulfillAcceptSignature, a as signRequest, c as verifyRequestDetailed, g as signObject, gt as formatAcceptSignature, k as createSignature, m as hasProofLike, p as createProof, s as verifyRequest, v as verifyObject, vt as parseAcceptSignature, y as verifyPortableObjectProof, yt as validateAcceptSignature, z as verifySignature } from "./http-C8rIQ1pK.js";
7
- import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-DNjv5rBL.js";
6
+ import { A as detachSignature, C as verifyProof, D as attachSignature, G as generateCryptoKeyPair, I as signJsonLd, K as importJwk, N as hasSignatureLike, R as verifyJsonLd, U as fetchKey, V as exportJwk, W as fetchKeyDetailed, _t as fulfillAcceptSignature, a as signRequest, c as verifyRequestDetailed, g as signObject, gt as formatAcceptSignature, k as createSignature, m as hasProofLike, p as createProof, s as verifyRequest, v as verifyObject, vt as parseAcceptSignature, y as verifyPortableObjectProof, yt as validateAcceptSignature, z as verifySignature } from "./http-KKViNOVp.js";
7
+ import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-Ckc0daKd.js";
8
8
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-_S2_MeLF.js";
9
- import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-DReoGwZQ.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DSUypZWS.js";
9
+ import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-sJBoBful.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DBnYVLSn.js";
11
11
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError } from "./federation/mod.js";
12
12
  import "./nodeinfo/mod.js";
13
13
  import "./runtime/mod.js";
@@ -5,7 +5,7 @@ import { r as createRequestContext } from "../context-8Tu9kea0.mjs";
5
5
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
7
7
  import "../std__assert-DvMDRPes.mjs";
8
- import { D as handleNodeInfoJrd, E as handleNodeInfo, o as createFederation } from "../middleware-rQqAHzIo.mjs";
8
+ import { D as handleNodeInfoJrd, E as handleNodeInfo, o as createFederation } from "../middleware-Defzf-30.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  //#region src/nodeinfo/handler.test.ts
11
11
  test("handleNodeInfo()", async () => {
@@ -2,10 +2,10 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { d as isPortableUri, l as isPortableId, n as getCanonicalPortableId, p as isSamePublicKey$1, s as isCompatibleKeyId } from "./portable-key-id-Ca30-hOa.mjs";
5
- import { n as version, t as name } from "./deno-D4J5fszd.mjs";
5
+ import { n as version, t as name } from "./deno-Cqkt-KD5.mjs";
6
6
  import { i as parseKeyOwnerEvidence, r as getVerifiedKeyOwnerEvidence } from "./key-owner-evidence-APB6NpSk.mjs";
7
- import { E as verifyKeyOwnership, b as fetchActorDocument, y as exportJwk } from "./ld-BeBdBDAY.mjs";
8
- import { n as resolvePortableActorKey, t as fetchPortableGatewayKey } from "./portable-key-Bkm6sXJB.mjs";
7
+ import { E as verifyKeyOwnership, b as fetchActorDocument, y as exportJwk } from "./ld-C13upTHv.mjs";
8
+ import { n as resolvePortableActorKey, t as fetchPortableGatewayKey } from "./portable-key-zbE5iDhv.mjs";
9
9
  import { getLogger } from "@logtape/logtape";
10
10
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
11
11
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,5 +1,5 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
- const require_http = require("./http-SBTDzPkh.cjs");
2
+ const require_http = require("./http-C88K-3A8.cjs");
3
3
  let _logtape_logtape = require("@logtape/logtape");
4
4
  let _fedify_vocab = require("@fedify/vocab");
5
5
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -1,8 +1,8 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-D4J5fszd.mjs";
5
- import { d as verifyPortableObjectProofWithRoot, l as verifyPortableObjectProof } from "./proof-DOV4ZiAo.mjs";
4
+ import { n as version, t as name } from "./deno-Cqkt-KD5.mjs";
5
+ import { d as verifyPortableObjectProofWithRoot, l as verifyPortableObjectProof } from "./proof-DdI4I2Jg.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { CollectionPage, Object as Object$1, isActor } from "@fedify/vocab";
8
8
  import { trace } from "@opentelemetry/api";
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { At as isPortableId, Ft as name, H as fetchActorDocument, It as version, J as verifyKeyOwnership, Mt as isPortableUri, Pt as isSamePublicKey$1, V as exportJwk, X as getVerifiedKeyOwnerEvidence, Z as parseKeyOwnerEvidence, kt as isCompatibleKeyId, l as fetchPortableGatewayKey, u as resolvePortableActorKey, wt as getCanonicalPortableId, x as verifyPortableObjectProofWithRoot, y as verifyPortableObjectProof } from "./http-C8rIQ1pK.js";
3
+ import { At as isPortableId, Ft as name, H as fetchActorDocument, It as version, J as verifyKeyOwnership, Mt as isPortableUri, Pt as isSamePublicKey$1, V as exportJwk, X as getVerifiedKeyOwnerEvidence, Z as parseKeyOwnerEvidence, kt as isCompatibleKeyId, l as fetchPortableGatewayKey, u as resolvePortableActorKey, wt as getCanonicalPortableId, x as verifyPortableObjectProofWithRoot, y as verifyPortableObjectProof } from "./http-KKViNOVp.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { CollectionPage, CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -2,7 +2,7 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { a as getRawCanonicalPortableId, c as isPortableActorDocument, d as isPortableUri, n as getCanonicalPortableId, p as isSamePublicKey } from "./portable-key-id-Ca30-hOa.mjs";
5
- import { d as verifyPortableObjectProofWithRoot } from "./proof-DOV4ZiAo.mjs";
5
+ import { d as verifyPortableObjectProofWithRoot } from "./proof-DdI4I2Jg.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { CryptographicKey, Multikey, Object as Object$1 } from "@fedify/vocab";
8
8
  import { FetchError, formatIri, getDocumentLoader, isGatewayUrl, parseIri, toCompatibleEf61Id } from "@fedify/vocab-runtime";
@@ -3,9 +3,9 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { i as getPortableDid, l as isPortableId } from "./portable-key-id-Ca30-hOa.mjs";
5
5
  import { a as verificationObservation, i as triedKey, n as observeCheck, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
6
- import { n as version, t as name } from "./deno-D4J5fszd.mjs";
7
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-Dtb81JxK.mjs";
8
- import { T as validateCryptoKey, c as getNormalizationContextLoader, v as bypassKeyCacheReads, x as fetchKey } from "./ld-BeBdBDAY.mjs";
6
+ import { n as version, t as name } from "./deno-Cqkt-KD5.mjs";
7
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-Ci3oTjhF.mjs";
8
+ import { T as validateCryptoKey, c as getNormalizationContextLoader, v as bypassKeyCacheReads, x as fetchKey } from "./ld-C13upTHv.mjs";
9
9
  import { n as preloadedOnlyDocumentLoader } from "./public-audience--klBIOk1.mjs";
10
10
  import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-4IJqPYos.mjs";
11
11
  import { getLogger } from "@logtape/logtape";