@fedify/fedify 0.12.0-dev.278 → 0.12.0-dev.282

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 (36) hide show
  1. package/CHANGES.md +45 -0
  2. package/esm/runtime/key.js +1 -1
  3. package/esm/runtime/url.js +9 -5
  4. package/esm/sig/http.js +1 -1
  5. package/package.json +1 -1
  6. package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/concat.d.ts.map +1 -1
  7. package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/copy.d.ts.map +1 -1
  8. package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/ends_with.d.ts.map +1 -1
  9. package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/equals.d.ts.map +1 -1
  10. package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/includes_needle.d.ts.map +1 -1
  11. package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/index_of_needle.d.ts.map +1 -1
  12. package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/last_index_of_needle.d.ts.map +1 -1
  13. package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/mod.d.ts.map +1 -1
  14. package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/repeat.d.ts.map +1 -1
  15. package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/starts_with.d.ts.map +1 -1
  16. package/types/runtime/url.d.ts.map +1 -1
  17. /package/esm/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/concat.js +0 -0
  18. /package/esm/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/copy.js +0 -0
  19. /package/esm/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/ends_with.js +0 -0
  20. /package/esm/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/equals.js +0 -0
  21. /package/esm/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/includes_needle.js +0 -0
  22. /package/esm/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/index_of_needle.js +0 -0
  23. /package/esm/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/last_index_of_needle.js +0 -0
  24. /package/esm/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/mod.js +0 -0
  25. /package/esm/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/repeat.js +0 -0
  26. /package/esm/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/starts_with.js +0 -0
  27. /package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/concat.d.ts +0 -0
  28. /package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/copy.d.ts +0 -0
  29. /package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/ends_with.d.ts +0 -0
  30. /package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/equals.d.ts +0 -0
  31. /package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/includes_needle.d.ts +0 -0
  32. /package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/index_of_needle.d.ts +0 -0
  33. /package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/last_index_of_needle.d.ts +0 -0
  34. /package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/mod.d.ts +0 -0
  35. /package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/repeat.d.ts +0 -0
  36. /package/types/deps/jsr.io/@std/bytes/{1.0.1 → 1.0.2}/starts_with.d.ts +0 -0
package/CHANGES.md CHANGED
@@ -99,6 +99,21 @@ To be released.
99
99
  [#92]: https://github.com/dahlia/fedify/pull/92
100
100
 
101
101
 
102
+ Version 0.11.2
103
+ --------------
104
+
105
+ Released on July 9, 2024.
106
+
107
+ - Fixed a vulnerability of SSRF via DNS rebinding in the built-in document
108
+ loader. [[CVE-2024-39687]]
109
+
110
+ - The `fetchDocumentLoader()` function now throws an error when the given
111
+ domain name has any records referring to a private network address.
112
+ - The `getAuthenticatedDocumentLoader()` function now returns a document
113
+ loader that throws an error when the given domain name has any records
114
+ referring to a private network address.
115
+
116
+
102
117
  Version 0.11.1
103
118
  --------------
104
119
 
@@ -297,6 +312,21 @@ Released on June 29, 2024.
297
312
  [#80]: https://github.com/dahlia/fedify/pull/80
298
313
 
299
314
 
315
+ Version 0.10.2
316
+ --------------
317
+
318
+ Released on July 9, 2024.
319
+
320
+ - Fixed a vulnerability of SSRF via DNS rebinding in the built-in document
321
+ loader. [[CVE-2024-39687]]
322
+
323
+ - The `fetchDocumentLoader()` function now throws an error when the given
324
+ domain name has any records referring to a private network address.
325
+ - The `getAuthenticatedDocumentLoader()` function now returns a document
326
+ loader that throws an error when the given domain name has any records
327
+ referring to a private network address.
328
+
329
+
300
330
  Version 0.10.1
301
331
  --------------
302
332
 
@@ -473,6 +503,21 @@ is now distributed under the [MIT License] to encourage wider adoption.
473
503
  [x-forwarded-fetch]: https://github.com/dahlia/x-forwarded-fetch
474
504
 
475
505
 
506
+ Version 0.9.3
507
+ -------------
508
+
509
+ Released on July 9, 2024.
510
+
511
+ - Fixed a vulnerability of SSRF via DNS rebinding in the built-in document
512
+ loader. [[CVE-2024-39687]]
513
+
514
+ - The `fetchDocumentLoader()` function now throws an error when the given
515
+ domain name has any records referring to a private network address.
516
+ - The `getAuthenticatedDocumentLoader()` function now returns a document
517
+ loader that throws an error when the given domain name has any records
518
+ referring to a private network address.
519
+
520
+
476
521
  Version 0.9.2
477
522
  -------------
478
523
 
@@ -1,6 +1,6 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import { createPublicKey } from "node:crypto";
3
- import { concat } from "../deps/jsr.io/@std/bytes/1.0.1/concat.js";
3
+ import { concat } from "../deps/jsr.io/@std/bytes/1.0.2/concat.js";
4
4
  import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/0.224.3/base64.js";
5
5
  import { decodeBase64Url } from "../deps/jsr.io/@std/encoding/0.224.3/base64url.js";
6
6
  import { decodeHex } from "../deps/jsr.io/@std/encoding/0.224.3/hex.js";
@@ -30,11 +30,15 @@ export async function validatePublicUrl(url) {
30
30
  if (netPermission.state !== "granted")
31
31
  return;
32
32
  }
33
- const { address, family } = await lookup(hostname);
34
- if (family === 4 && !isValidPublicIPv4Address(address) ||
35
- family === 6 && !isValidPublicIPv6Address(address) ||
36
- family < 4 || family === 5 || family > 6) {
37
- throw new UrlError(`Invalid or private address: ${address}`);
33
+ // To prevent SSRF via DNS rebinding, we need to resolve all IP addresses
34
+ // and ensure that they are all public:
35
+ const addresses = await lookup(hostname, { all: true });
36
+ for (const { address, family } of addresses) {
37
+ if (family === 4 && !isValidPublicIPv4Address(address) ||
38
+ family === 6 && !isValidPublicIPv6Address(address) ||
39
+ family < 4 || family === 5 || family > 6) {
40
+ throw new UrlError(`Invalid or private address: ${address}`);
41
+ }
38
42
  }
39
43
  }
40
44
  export function isValidPublicIPv4Address(address) {
package/esm/sig/http.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import { getLogger } from "@logtape/logtape";
3
- import { equals } from "../deps/jsr.io/@std/bytes/1.0.1/mod.js";
3
+ import { equals } from "../deps/jsr.io/@std/bytes/1.0.2/mod.js";
4
4
  import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/0.224.3/base64.js";
5
5
  import { CryptographicKey } from "../vocab/vocab.js";
6
6
  import { fetchKey, validateCryptoKey } from "./key.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "0.12.0-dev.278+8699f21b",
3
+ "version": "0.12.0-dev.282+410cc775",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -1 +1 @@
1
- {"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.1/concat.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAaxD"}
1
+ {"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.2/concat.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAaxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.1/copy.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,SAAI,GAAG,MAAM,CAQzE"}
1
+ {"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.2/copy.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,SAAI,GAAG,MAAM,CAQzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"ends_with.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.1/ends_with.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAWxE"}
1
+ {"version":3,"file":"ends_with.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.2/ends_with.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAWxE"}
@@ -1 +1 @@
1
- {"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.1/equals.ts"],"names":[],"mappings":"AA6DA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,OAAO,CAQ5D"}
1
+ {"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.2/equals.ts"],"names":[],"mappings":"AA6DA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,OAAO,CAQ5D"}
@@ -1 +1 @@
1
- {"version":3,"file":"includes_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.1/includes_needle.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,SAAI,GACR,OAAO,CAET"}
1
+ {"version":3,"file":"includes_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.2/includes_needle.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,SAAI,GACR,OAAO,CAET"}
@@ -1 +1 @@
1
- {"version":3,"file":"index_of_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.1/index_of_needle.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,SAAI,GACR,MAAM,CAqBR"}
1
+ {"version":3,"file":"index_of_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.2/index_of_needle.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,SAAI,GACR,MAAM,CAqBR"}
@@ -1 +1 @@
1
- {"version":3,"file":"last_index_of_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.1/last_index_of_needle.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,GAAE,MAA0B,GAChC,MAAM,CAuBR"}
1
+ {"version":3,"file":"last_index_of_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.2/last_index_of_needle.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,GAAE,MAA0B,GAChC,MAAM,CAuBR"}
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.1/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.2/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.1/repeat.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAapE"}
1
+ {"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.2/repeat.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAapE"}
@@ -1 +1 @@
1
- {"version":3,"file":"starts_with.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.1/starts_with.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAS1E"}
1
+ {"version":3,"file":"starts_with.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.2/starts_with.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAS1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/runtime/url.ts"],"names":[],"mappings":"AAIA,qBAAa,QAAS,SAAQ,KAAK;gBACrB,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BlE;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CASjE;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,WASvD;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAWzD"}
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/runtime/url.ts"],"names":[],"mappings":"AAIA,qBAAa,QAAS,SAAQ,KAAK;gBACrB,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BlE;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CASjE;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,WASvD;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAWzD"}