@openclaw/slack 2026.10.10 → 2026.11.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{account-inspect-Bc7TVU8F.mjs → account-inspect-DgQgj0wk.mjs} +11 -8
- package/dist/.setup/{accounts-CEgdyqoW.mjs → accounts-EaPP0fFY.mjs} +10 -1
- package/dist/.setup/{action-runtime-DPoxYao5.mjs → action-runtime-CK9QZgQl.mjs} +38 -45
- package/dist/.setup/action-runtime.runtime-CpZktret.mjs +1 -0
- package/dist/.setup/{actions-PF2cP6to.mjs → actions-s3CcFO45.mjs} +89 -76
- package/dist/.setup/{approval-handler.runtime-BtRklemy.mjs → approval-handler.runtime-Ch7BecYK.mjs} +26 -30
- package/dist/.setup/{approval-message-updates-CpwbsEj6.mjs → approval-message-updates-CqcRoa28.mjs} +1 -1
- package/dist/.setup/{channel-B6bRmYmX.mjs → channel-CAvo_WNZ.mjs} +566 -338
- package/dist/.setup/{channel-type-Dh4vwh1Y.mjs → channel-type-9Lw6yLf2.mjs} +4 -8
- package/dist/.setup/{channel.setup-BBzT6uKA.mjs → channel.setup-BlgXNuCJ.mjs} +13 -13
- package/dist/.setup/{config-schema-Cz3uId-c.mjs → config-schema-Bx1tCZB0.mjs} +3 -7
- package/dist/.setup/cursor-pages-jVn3Vkfi.mjs +309 -0
- package/dist/.setup/{directory-config-BEPra1E2.mjs → directory-config-CGvKYg9F.mjs} +3 -3
- package/dist/.setup/{directory-live-BkUwPrS0.mjs → directory-live-DNdw97LA.mjs} +4 -4
- package/dist/.setup/{doctor-contract-HK8aedwU.mjs → doctor-contract-BB2KJ9Ni.mjs} +37 -45
- package/dist/.setup/{message-tool-api-DeiQJoRV.mjs → message-tool-api-B38BpEaE.mjs} +4 -3
- package/dist/.setup/{monitor-DsZUQtTM.mjs → monitor-BD86SotB.mjs} +3397 -3672
- package/dist/.setup/{outbound-adapter-C0R5jz6S.mjs → outbound-adapter-BH6iPWBj.mjs} +30 -36
- package/dist/.setup/paths-CQZI_5WY.mjs +7 -0
- package/dist/.setup/{pipeline.runtime-CIFVL0kf.mjs → pipeline.runtime-C4ELxaRU.mjs} +415 -534
- package/dist/.setup/{policy-Bp1FvE6m.mjs → policy-C6_DdlSf.mjs} +1 -2
- package/dist/.setup/{session-status-CHkEn3HM.mjs → probe-B_Ax1vS1.mjs} +985 -622
- package/dist/.setup/question-delivery-D3qAIwuv.mjs +38 -0
- package/dist/.setup/{relay-source-DFBDTA5Z.mjs → relay-source-a8jodKuO.mjs} +11 -4
- package/dist/.setup/{replies-7DRN46EL.mjs → replies-Bq7n0gfM.mjs} +34 -19
- package/dist/.setup/{reply-blocks-DOjiDr44.mjs → reply-blocks-DyYYRrP_.mjs} +200 -205
- package/dist/.setup/{resolve-channels-BNQ1KZXh.mjs → resolve-channels-CF2JME9q.mjs} +4 -7
- package/dist/.setup/{resolve-users-C4dC8Z7D.mjs → resolve-users-DDcCAjH1.mjs} +8 -16
- package/dist/.setup/{scopes-C1aeCBa6.mjs → scopes-CzHC_dwV.mjs} +2 -1
- package/dist/.setup/{secret-contract-D0UY2JWF.mjs → secret-contract-CqVqR7MP.mjs} +4 -2
- package/dist/.setup/{secret-contract-api-BhzGpUb0.mjs → secret-contract-api-DaCXZ47j.mjs} +1 -1
- package/dist/.setup/{send-C5uXkmZV.mjs → send-WJZ73VSf.mjs} +297 -333
- package/dist/.setup/{send-results-D-o6PgtS.mjs → send-results-Bm6V1ekL.mjs} +3 -4
- package/dist/.setup/setup-plugin-api-DJXIB8CF.mjs +2 -0
- package/dist/.setup/{setup-surface-CtM1pm-9.mjs → setup-surface-uIqP2B0Y.mjs} +5 -6
- package/dist/.setup/{slash-dispatch.runtime-Bnn9a5qB.mjs → slash-dispatch.runtime-Cwuwv7FL.mjs} +2 -2
- package/dist/.setup/{target-parsing-0pRZtahO.mjs → target-parsing-DwYAP3ts.mjs} +1 -2
- package/dist/.setup/{targets-BqXz7CpG.mjs → targets-eeOxA_b_.mjs} +1 -1
- package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -0
- package/dist/account-inspect-api.js +1 -1
- package/dist/api.js +16 -17
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +0 -6
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +10 -12
- package/dist/secret-contract-api.js +1 -1
- package/dist/setup-entry.js +2 -2
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/bolt/node_modules/@types/node/util.d.ts +6 -3
- package/node_modules/@slack/bolt/node_modules/body-parser/README.md +13 -17
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/read.js +57 -74
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/types/json.js +11 -11
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/types/urlencoded.js +5 -5
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/utils.js +15 -0
- package/node_modules/@slack/bolt/node_modules/body-parser/package.json +12 -7
- package/node_modules/@slack/bolt/node_modules/content-disposition/README.md +105 -35
- package/node_modules/@slack/bolt/node_modules/content-disposition/dist/index.d.ts +72 -0
- package/node_modules/@slack/bolt/node_modules/content-disposition/dist/index.js +388 -0
- package/node_modules/@slack/bolt/node_modules/content-disposition/dist/index.js.map +1 -0
- package/node_modules/@slack/bolt/node_modules/content-disposition/package.json +31 -19
- package/node_modules/@slack/bolt/node_modules/content-type/README.md +34 -57
- package/node_modules/@slack/bolt/node_modules/content-type/package.json +35 -25
- package/node_modules/@slack/bolt/node_modules/express/Readme.md +15 -9
- package/node_modules/@slack/bolt/node_modules/express/lib/application.js +2 -2
- package/node_modules/@slack/bolt/node_modules/express/lib/request.js +32 -19
- package/node_modules/@slack/bolt/node_modules/express/lib/response.js +27 -30
- package/node_modules/@slack/bolt/node_modules/express/package.json +10 -10
- package/node_modules/@slack/bolt/node_modules/qs/.github/THREAT_MODEL.md +4 -2
- package/node_modules/@slack/bolt/node_modules/qs/CHANGELOG.md +38 -14
- package/node_modules/@slack/bolt/node_modules/qs/README.md +31 -3
- package/node_modules/@slack/bolt/node_modules/qs/dist/qs.js +20 -20
- package/node_modules/@slack/bolt/node_modules/qs/lib/parse.js +94 -4
- package/node_modules/@slack/bolt/node_modules/qs/lib/stringify.js +4 -4
- package/node_modules/@slack/bolt/node_modules/qs/lib/utils.js +130 -6
- package/node_modules/@slack/bolt/node_modules/qs/package.json +4 -4
- package/node_modules/@slack/bolt/node_modules/qs/test/parse.js +174 -0
- package/node_modules/@slack/bolt/node_modules/qs/test/stringify.js +263 -33
- package/node_modules/@slack/bolt/node_modules/qs/test/utils.js +184 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +6 -3
- package/node_modules/typebox/build/format/duration.d.mts +2 -2
- package/node_modules/typebox/build/format/duration.mjs +2 -2
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_email.mjs +1 -0
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_hostname.mjs +1 -1
- package/node_modules/typebox/build/format/ipv4.d.mts +2 -2
- package/node_modules/typebox/build/format/ipv4.mjs +2 -2
- package/node_modules/typebox/build/format/ipv6.d.mts +1 -1
- package/node_modules/typebox/build/format/ipv6.mjs +1 -1
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/schema/build.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/_unique.d.mts +4 -2
- package/node_modules/typebox/build/schema/engine/_unique.mjs +7 -3
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +0 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +15 -17
- package/node_modules/typebox/build/schema/engine/contains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/index.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/items.mjs +7 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/minContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
- package/node_modules/typebox/build/system/hashing/hash.mjs +63 -34
- package/node_modules/typebox/build/system/locale/en_US.mjs +2 -1
- package/node_modules/typebox/build/system/memory/assign.d.mts +2 -8
- package/node_modules/typebox/build/system/memory/assign.mjs +13 -6
- package/node_modules/typebox/build/system/memory/clone.d.mts +4 -5
- package/node_modules/typebox/build/system/memory/clone.mjs +8 -96
- package/node_modules/typebox/build/system/memory/create.d.mts +1 -5
- package/node_modules/typebox/build/system/memory/create.mjs +18 -13
- package/node_modules/typebox/build/system/memory/deep.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/deep.mjs +108 -0
- package/node_modules/typebox/build/system/memory/discard.d.mts +1 -1
- package/node_modules/typebox/build/system/memory/discard.mjs +9 -8
- package/node_modules/typebox/build/system/memory/finalize.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/finalize.mjs +30 -0
- package/node_modules/typebox/build/system/memory/keys.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/keys.mjs +8 -0
- package/node_modules/typebox/build/system/memory/update.d.mts +1 -4
- package/node_modules/typebox/build/system/memory/update.mjs +43 -16
- package/node_modules/typebox/build/type/engine/call/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/call/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +2 -24
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +2 -29
- package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -1
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +6 -1
- package/node_modules/typebox/build/type/engine/evaluate/property.d.mts +30 -0
- package/node_modules/typebox/build/type/engine/evaluate/property.mjs +29 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/this/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/this/index.mjs +1 -0
- package/node_modules/typebox/build/value/clone/clone.d.mts +4 -3
- package/node_modules/typebox/build/value/clone/clone.mjs +5 -7
- package/node_modules/typebox/build/value/repair/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +25 -14
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +1 -1
- package/node_modules/undici/docs/docs/api/Interceptors.md +15 -2
- package/node_modules/undici/lib/dispatcher/client-h2.js +78 -3
- package/node_modules/undici/lib/dispatcher/pool-base.js +20 -3
- package/node_modules/undici/package.json +3 -3
- package/node_modules/undici/types/api.d.ts +1 -1
- package/node_modules/undici/types/utility.d.ts +4 -4
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
- package/node_modules/zod/src/v4/core/compile.ts +9 -0
- package/node_modules/zod/src/v4/core/schemas.ts +35 -1
- package/node_modules/zod/src/v4/core/util.ts +13 -0
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.d.cts +3 -1
- package/node_modules/zod/v4/core/schemas.d.ts +3 -1
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.d.cts +2 -0
- package/node_modules/zod/v4/core/util.d.ts +2 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/openclaw.plugin.json +6 -30
- package/package.json +7 -7
- package/dist/.setup/action-runtime.runtime-DWKWaKgC.mjs +0 -1
- package/dist/.setup/http-GpAVKwSX.mjs +0 -2
- package/dist/.setup/plugin-routes-lXsy_bNV.mjs +0 -21
- package/dist/.setup/probe-C5VWf3sz.mjs +0 -686
- package/dist/.setup/registry-1G0f1zuZ.mjs +0 -34
- package/dist/.setup/setup-plugin-api-D7DoueEh.mjs +0 -2
- package/dist/.setup/shared-CohTHxM1.mjs +0 -255
- package/dist/.source-module-urls/562d694877afe9d9dcbb3b32a8883c16974738f2aa892c48d45572cdc9a62529.json +0 -1
- package/dist/http-routes-api.js +0 -1
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/LICENSE +0 -22
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/README.md +0 -71
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/package.json +0 -52
- package/node_modules/@slack/bolt/node_modules/content-disposition/index.js +0 -536
- package/node_modules/@slack/bolt/node_modules/content-type/HISTORY.md +0 -29
- package/node_modules/@slack/bolt/node_modules/content-type/index.js +0 -225
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/LICENSE +0 -22
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/README.md +0 -71
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +0 -46
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js +0 -176
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js.map +0 -1
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/package.json +0 -52
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/LICENSE +0 -22
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/README.md +0 -71
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.d.ts +0 -46
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js +0 -176
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js.map +0 -1
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/package.json +0 -52
- package/node_modules/typebox/build/system/memory/freeze.d.mts +0 -4
- package/node_modules/typebox/build/system/memory/freeze.mjs +0 -6
- /package/node_modules/@slack/bolt/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.d.ts +0 -0
- /package/node_modules/@slack/bolt/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js +0 -0
- /package/node_modules/@slack/bolt/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js.map +0 -0
|
@@ -1,42 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "content-type",
|
|
3
|
+
"version": "2.1.0",
|
|
3
4
|
"description": "Create and parse HTTP Content-Type header",
|
|
4
|
-
"version": "1.0.5",
|
|
5
|
-
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
6
|
-
"license": "MIT",
|
|
7
5
|
"keywords": [
|
|
8
6
|
"content-type",
|
|
9
7
|
"http",
|
|
10
8
|
"req",
|
|
11
9
|
"res",
|
|
12
|
-
"rfc7231"
|
|
10
|
+
"rfc7231",
|
|
11
|
+
"rfc9110"
|
|
13
12
|
],
|
|
14
13
|
"repository": "jshttp/content-type",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"eslint-config-standard": "15.0.1",
|
|
19
|
-
"eslint-plugin-import": "2.27.5",
|
|
20
|
-
"eslint-plugin-node": "11.1.0",
|
|
21
|
-
"eslint-plugin-promise": "6.1.1",
|
|
22
|
-
"eslint-plugin-standard": "4.1.0",
|
|
23
|
-
"mocha": "10.2.0",
|
|
24
|
-
"nyc": "15.1.0"
|
|
14
|
+
"funding": {
|
|
15
|
+
"type": "opencollective",
|
|
16
|
+
"url": "https://opencollective.com/express"
|
|
25
17
|
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
20
|
+
"type": "commonjs",
|
|
21
|
+
"exports": "./dist/index.js",
|
|
22
|
+
"main": "./dist/index.js",
|
|
23
|
+
"typings": "./dist/index.d.ts",
|
|
26
24
|
"files": [
|
|
27
|
-
"
|
|
28
|
-
"HISTORY.md",
|
|
29
|
-
"README.md",
|
|
30
|
-
"index.js"
|
|
25
|
+
"dist/"
|
|
31
26
|
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"bench": "vitest bench",
|
|
29
|
+
"build": "ts-scripts build",
|
|
30
|
+
"format": "ts-scripts format",
|
|
31
|
+
"prepare": "ts-scripts install && npm run build",
|
|
32
|
+
"specs": "ts-scripts specs",
|
|
33
|
+
"test": "ts-scripts test"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@borderless/ts-scripts": "^0.15.0",
|
|
37
|
+
"@vitest/coverage-v8": "^3.0.5",
|
|
38
|
+
"typescript": "^5.7.3",
|
|
39
|
+
"vitest": "^3.2.4"
|
|
40
|
+
},
|
|
32
41
|
"engines": {
|
|
33
|
-
"node": ">=
|
|
42
|
+
"node": ">=18"
|
|
34
43
|
},
|
|
35
|
-
"scripts": {
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
44
|
+
"ts-scripts": {
|
|
45
|
+
"dist": [
|
|
46
|
+
"dist"
|
|
47
|
+
],
|
|
48
|
+
"project": [
|
|
49
|
+
"tsconfig.build.json"
|
|
50
|
+
]
|
|
41
51
|
}
|
|
42
52
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
<a href="https://expressjs.com/">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://expressjs.com/images/logos/logo-express-white.svg">
|
|
4
|
+
<img alt="Express Logo" src="https://expressjs.com/images/logos/logo-express-black.svg" width="280">
|
|
5
|
+
</picture>
|
|
6
|
+
</a>
|
|
2
7
|
|
|
3
8
|
**Fast, unopinionated, minimalist web framework for [Node.js](https://nodejs.org).**
|
|
4
9
|
|
|
5
|
-
**This project has a [Code of Conduct].**
|
|
6
|
-
|
|
7
10
|
## Table of contents
|
|
8
11
|
|
|
9
|
-
- [Table of contents](#table-of-contents)
|
|
10
12
|
- [Installation](#installation)
|
|
11
13
|
- [Features](#features)
|
|
12
14
|
- [Docs \& Community](#docs--community)
|
|
@@ -57,7 +59,7 @@ If this is a brand new project, make sure to create a `package.json` first with
|
|
|
57
59
|
the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file).
|
|
58
60
|
|
|
59
61
|
Installation is done using the
|
|
60
|
-
[`npm install` command](https://docs.npmjs.com/
|
|
62
|
+
[`npm install` command](https://docs.npmjs.com/downloading-and-installing-packages-locally):
|
|
61
63
|
|
|
62
64
|
```bash
|
|
63
65
|
npm install express
|
|
@@ -80,7 +82,7 @@ for more information.
|
|
|
80
82
|
|
|
81
83
|
* [Website and Documentation](https://expressjs.com/) - [[website repo](https://github.com/expressjs/expressjs.com)]
|
|
82
84
|
* [GitHub Organization](https://github.com/expressjs) for Official Middleware & Modules
|
|
83
|
-
* [
|
|
85
|
+
* [GitHub Discussions](https://github.com/expressjs/discussions) for discussion on the development and usage of Express
|
|
84
86
|
|
|
85
87
|
**PROTIP** Be sure to read the [migration guide to v5](https://expressjs.com/en/guide/migrating-5)
|
|
86
88
|
|
|
@@ -152,9 +154,11 @@ tests, triaging incoming pull requests and issues, and more!
|
|
|
152
154
|
|
|
153
155
|
See the [Contributing Guide] for more technical details on contributing.
|
|
154
156
|
|
|
157
|
+
This project has a [Code of Conduct]. By participating, you are expected to uphold this code.
|
|
158
|
+
|
|
155
159
|
### Security Issues
|
|
156
160
|
|
|
157
|
-
If you discover a security vulnerability in Express, please see [Security Policies and Procedures](
|
|
161
|
+
If you discover a security vulnerability in Express, please see [Security Policies and Procedures](https://github.com/expressjs/express/security/policy).
|
|
158
162
|
|
|
159
163
|
### Running Tests
|
|
160
164
|
|
|
@@ -212,7 +216,9 @@ The original author of Express is [TJ Holowaychuk](https://github.com/tj)
|
|
|
212
216
|
* [IamLizu](https://github.com/IamLizu) - **S M Mahmudul Hasan** (he/him)
|
|
213
217
|
* [Phillip9587](https://github.com/Phillip9587) - **Phillip Barta**
|
|
214
218
|
* [efekrskl](https://github.com/efekrskl) - **Efe Karasakal**
|
|
215
|
-
|
|
219
|
+
* [rxmarbles](https://github.com/rxmarbles) - **Rick Markins** (he/him)
|
|
220
|
+
* [krzysdz](https://github.com/krzysdz)
|
|
221
|
+
* [GroophyLifefor](https://github.com/GroophyLifefor) - **Murat Kirazkaya**
|
|
216
222
|
|
|
217
223
|
<details>
|
|
218
224
|
<summary>Triagers emeriti members</summary>
|
|
@@ -247,7 +253,7 @@ The original author of Express is [TJ Holowaychuk](https://github.com/tj)
|
|
|
247
253
|
* [tunniclm](https://github.com/tunniclm) - **Mike Tunnicliffe**
|
|
248
254
|
* [enyoghasim](https://github.com/enyoghasim) - **David Enyoghasim**
|
|
249
255
|
* [0ss](https://github.com/0ss) - **Salah**
|
|
250
|
-
* [
|
|
256
|
+
* [ejcheng](https://github.com/ejcheng)- **Eric Cheng** (he/him)
|
|
251
257
|
* [dakshkhetan](https://github.com/dakshkhetan) - **Daksh Khetan** (he/him)
|
|
252
258
|
* [lucasraziel](https://github.com/lucasraziel) - **Lucas Soares Do Rego**
|
|
253
259
|
* [mertcanaltin](https://github.com/mertcanaltin) - **Mert Can Altin**
|
|
@@ -523,7 +523,7 @@ app.render = function render(name, options, callback) {
|
|
|
523
523
|
var cache = this.cache;
|
|
524
524
|
var done = callback;
|
|
525
525
|
var engines = this.engines;
|
|
526
|
-
var opts = options;
|
|
526
|
+
var opts = options || {};
|
|
527
527
|
var view;
|
|
528
528
|
|
|
529
529
|
// support callback function as second arg
|
|
@@ -614,7 +614,7 @@ app.listen = function listen() {
|
|
|
614
614
|
|
|
615
615
|
function logerror(err) {
|
|
616
616
|
/* istanbul ignore next */
|
|
617
|
-
if (this.get('env') !== 'test') console.error(err
|
|
617
|
+
if (this.get('env') !== 'test') console.error(err);
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
/**
|
|
@@ -83,16 +83,13 @@ req.header = function header(name) {
|
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* To do: update docs.
|
|
87
|
-
*
|
|
88
86
|
* Check if the given `type(s)` is acceptable, returning
|
|
89
|
-
* the best match when true, otherwise `
|
|
87
|
+
* the best match when true, otherwise `false`, in which
|
|
90
88
|
* case you should respond with 406 "Not Acceptable".
|
|
91
89
|
*
|
|
92
90
|
* The `type` value may be a single MIME type string
|
|
93
91
|
* such as "application/json", an extension name
|
|
94
|
-
* such as "json",
|
|
95
|
-
* an argument list such as `"json", "html", "text/plain"`,
|
|
92
|
+
* such as "json", an argument list such as `"json", "html", "text/plain"`,
|
|
96
93
|
* or an array `["json", "html", "text/plain"]`. When a list
|
|
97
94
|
* or array is given, the _best_ match, if any is returned.
|
|
98
95
|
*
|
|
@@ -107,7 +104,7 @@ req.header = function header(name) {
|
|
|
107
104
|
* // => "html"
|
|
108
105
|
* req.accepts('text/html');
|
|
109
106
|
* // => "text/html"
|
|
110
|
-
* req.accepts('json, text');
|
|
107
|
+
* req.accepts('json', 'text');
|
|
111
108
|
* // => "json"
|
|
112
109
|
* req.accepts('application/json');
|
|
113
110
|
* // => "application/json"
|
|
@@ -115,12 +112,11 @@ req.header = function header(name) {
|
|
|
115
112
|
* // Accept: text/*, application/json
|
|
116
113
|
* req.accepts('image/png');
|
|
117
114
|
* req.accepts('png');
|
|
118
|
-
* // =>
|
|
115
|
+
* // => false
|
|
119
116
|
*
|
|
120
117
|
* // Accept: text/*;q=.5, application/json
|
|
121
118
|
* req.accepts(['html', 'json']);
|
|
122
119
|
* req.accepts('html', 'json');
|
|
123
|
-
* req.accepts('html, json');
|
|
124
120
|
* // => "json"
|
|
125
121
|
*
|
|
126
122
|
* @param {String|Array} type(s)
|
|
@@ -147,17 +143,34 @@ req.acceptsEncodings = function(){
|
|
|
147
143
|
};
|
|
148
144
|
|
|
149
145
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
146
|
+
* Checks if the specified `charset`s are acceptable based on the request's `Accept-Charset` header.
|
|
147
|
+
* Returns the best matching charset or an array of acceptable charsets.
|
|
152
148
|
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
149
|
+
* The `charset` argument(s) can be:
|
|
150
|
+
* - A single charset string (e.g., "utf-8")
|
|
151
|
+
* - Multiple charset strings as arguments (e.g., `"utf-8", "iso-8859-1"`)
|
|
152
|
+
* - A comma-delimited list of charsets (e.g., `"utf-8, iso-8859-1"`)
|
|
153
|
+
*
|
|
154
|
+
* Examples:
|
|
155
|
+
*
|
|
156
|
+
* // Accept-Charset: utf-8, iso-8859-1
|
|
157
|
+
* req.acceptsCharsets('utf-8');
|
|
158
|
+
* // => "utf-8"
|
|
159
|
+
*
|
|
160
|
+
* req.acceptsCharsets('utf-8', 'iso-8859-1');
|
|
161
|
+
* // => "utf-8"
|
|
162
|
+
*
|
|
163
|
+
* req.acceptsCharsets('utf-8, utf-16');
|
|
164
|
+
* // => "utf-8"
|
|
165
|
+
*
|
|
166
|
+
* @param {...String} charsets - The charset(s) to check against the `Accept-Charset` header.
|
|
167
|
+
* @return {String|Array} - The best matching charset, or an array of acceptable charsets.
|
|
155
168
|
* @public
|
|
156
169
|
*/
|
|
157
170
|
|
|
158
|
-
req.acceptsCharsets = function(){
|
|
159
|
-
|
|
160
|
-
return accept.charsets
|
|
171
|
+
req.acceptsCharsets = function(...charsets) {
|
|
172
|
+
const accept = accepts(this);
|
|
173
|
+
return accept.charsets(...charsets);
|
|
161
174
|
};
|
|
162
175
|
|
|
163
176
|
/**
|
|
@@ -317,7 +330,7 @@ defineGetter(req, 'secure', function secure(){
|
|
|
317
330
|
/**
|
|
318
331
|
* Return the remote address from the trusted proxy.
|
|
319
332
|
*
|
|
320
|
-
*
|
|
333
|
+
* This is the remote address on the socket unless
|
|
321
334
|
* "trust proxy" is set.
|
|
322
335
|
*
|
|
323
336
|
* @return {String}
|
|
@@ -411,7 +424,7 @@ defineGetter(req, 'host', function host(){
|
|
|
411
424
|
} else if (val.indexOf(',') !== -1) {
|
|
412
425
|
// Note: X-Forwarded-Host is normally only ever a
|
|
413
426
|
// single value, but this is to be safe.
|
|
414
|
-
val = val.substring(0, val.indexOf(',')).
|
|
427
|
+
val = val.substring(0, val.indexOf(',')).trimEnd()
|
|
415
428
|
}
|
|
416
429
|
|
|
417
430
|
return val || undefined;
|
|
@@ -458,8 +471,8 @@ defineGetter(req, 'fresh', function(){
|
|
|
458
471
|
var res = this.res
|
|
459
472
|
var status = res.statusCode
|
|
460
473
|
|
|
461
|
-
// GET or
|
|
462
|
-
if ('GET' !== method && 'HEAD' !== method) return false;
|
|
474
|
+
// GET, HEAD, or QUERY for weak freshness validation only
|
|
475
|
+
if ('GET' !== method && 'HEAD' !== method && 'QUERY' !== method) return false;
|
|
463
476
|
|
|
464
477
|
// 2xx or 304 as per rfc2616 14.26
|
|
465
478
|
if ((status >= 200 && status < 300) || 304 === status) {
|
|
@@ -31,6 +31,7 @@ var cookie = require('cookie');
|
|
|
31
31
|
var send = require('send');
|
|
32
32
|
var extname = path.extname;
|
|
33
33
|
var resolve = path.resolve;
|
|
34
|
+
var basename = path.basename;
|
|
34
35
|
var vary = require('vary');
|
|
35
36
|
const { Buffer } = require('node:buffer');
|
|
36
37
|
|
|
@@ -126,7 +127,6 @@ res.send = function send(body) {
|
|
|
126
127
|
var chunk = body;
|
|
127
128
|
var encoding;
|
|
128
129
|
var req = this.req;
|
|
129
|
-
var type;
|
|
130
130
|
|
|
131
131
|
// settings
|
|
132
132
|
var app = this.app;
|
|
@@ -134,7 +134,12 @@ res.send = function send(body) {
|
|
|
134
134
|
switch (typeof chunk) {
|
|
135
135
|
// string defaulting to html
|
|
136
136
|
case 'string':
|
|
137
|
-
|
|
137
|
+
encoding = 'utf8';
|
|
138
|
+
const type = this.get('Content-Type');
|
|
139
|
+
|
|
140
|
+
if (typeof type === 'string') {
|
|
141
|
+
this.set('Content-Type', setCharset(type, 'utf-8'));
|
|
142
|
+
} else {
|
|
138
143
|
this.type('html');
|
|
139
144
|
}
|
|
140
145
|
break;
|
|
@@ -153,23 +158,11 @@ res.send = function send(body) {
|
|
|
153
158
|
break;
|
|
154
159
|
}
|
|
155
160
|
|
|
156
|
-
// write strings in utf-8
|
|
157
|
-
if (typeof chunk === 'string') {
|
|
158
|
-
encoding = 'utf8';
|
|
159
|
-
type = this.get('Content-Type');
|
|
160
|
-
|
|
161
|
-
// reflect this in content-type
|
|
162
|
-
if (typeof type === 'string') {
|
|
163
|
-
this.set('Content-Type', setCharset(type, 'utf-8'));
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
161
|
// determine if ETag should be generated
|
|
168
162
|
var etagFn = app.get('etag fn')
|
|
169
163
|
var generateETag = !this.get('ETag') && typeof etagFn === 'function'
|
|
170
164
|
|
|
171
|
-
|
|
172
|
-
var len
|
|
165
|
+
var len;
|
|
173
166
|
if (chunk !== undefined) {
|
|
174
167
|
if (Buffer.isBuffer(chunk)) {
|
|
175
168
|
// get length of Buffer
|
|
@@ -184,7 +177,11 @@ res.send = function send(body) {
|
|
|
184
177
|
len = chunk.length
|
|
185
178
|
}
|
|
186
179
|
|
|
187
|
-
|
|
180
|
+
// Because Content-Length and Transfer-Encoding can't be present in the response headers together,
|
|
181
|
+
// Content-Length should be added only if there is no Transfer-Encoding header
|
|
182
|
+
if (!this.get('Transfer-Encoding')) {
|
|
183
|
+
this.set('Content-Length', len);
|
|
184
|
+
}
|
|
188
185
|
}
|
|
189
186
|
|
|
190
187
|
// populate ETag
|
|
@@ -367,7 +364,7 @@ res.sendStatus = function sendStatus(statusCode) {
|
|
|
367
364
|
* if (yes) {
|
|
368
365
|
* res.sendFile('/uploads/' + uid + '/' + file);
|
|
369
366
|
* } else {
|
|
370
|
-
* res.send(403, 'Sorry! you
|
|
367
|
+
* res.send(403, 'Sorry! you can\'t see that.');
|
|
371
368
|
* }
|
|
372
369
|
* });
|
|
373
370
|
* });
|
|
@@ -452,7 +449,7 @@ res.download = function download (path, filename, options, callback) {
|
|
|
452
449
|
opts = null
|
|
453
450
|
}
|
|
454
451
|
|
|
455
|
-
// support optional filename, where options may be in
|
|
452
|
+
// support optional filename, where options may be in its place
|
|
456
453
|
if (typeof filename === 'object' &&
|
|
457
454
|
(typeof options === 'function' || options === undefined)) {
|
|
458
455
|
name = null
|
|
@@ -461,7 +458,7 @@ res.download = function download (path, filename, options, callback) {
|
|
|
461
458
|
|
|
462
459
|
// set Content-Disposition when file is sent
|
|
463
460
|
var headers = {
|
|
464
|
-
'Content-Disposition': contentDisposition(name || path)
|
|
461
|
+
'Content-Disposition': contentDisposition.create(basename(name || path))
|
|
465
462
|
};
|
|
466
463
|
|
|
467
464
|
// merge user-provided headers
|
|
@@ -491,7 +488,7 @@ res.download = function download (path, filename, options, callback) {
|
|
|
491
488
|
/**
|
|
492
489
|
* Set _Content-Type_ response header with `type` through `mime.contentType()`
|
|
493
490
|
* when it does not contain "/", or set the Content-Type to `type` otherwise.
|
|
494
|
-
* When no mapping is found
|
|
491
|
+
* When no mapping is found through `mime.contentType()`, the type is set to
|
|
495
492
|
* "application/octet-stream".
|
|
496
493
|
*
|
|
497
494
|
* Examples:
|
|
@@ -520,8 +517,9 @@ res.type = function contentType(type) {
|
|
|
520
517
|
* Respond to the Acceptable formats using an `obj`
|
|
521
518
|
* of mime-type callbacks.
|
|
522
519
|
*
|
|
523
|
-
* This method uses `req.
|
|
524
|
-
* acceptable types ordered by
|
|
520
|
+
* This method uses `req.accepts()`, which returns the
|
|
521
|
+
* best match from the acceptable types ordered by
|
|
522
|
+
* their quality values.
|
|
525
523
|
* When "Accept" is not present the _first_ callback
|
|
526
524
|
* is invoked, otherwise the first match is used. When
|
|
527
525
|
* no match is performed the server responds with
|
|
@@ -609,11 +607,12 @@ res.format = function(obj){
|
|
|
609
607
|
*/
|
|
610
608
|
|
|
611
609
|
res.attachment = function attachment(filename) {
|
|
612
|
-
|
|
613
|
-
|
|
610
|
+
const name = filename !== undefined ? basename(filename) : undefined;
|
|
611
|
+
if (name) {
|
|
612
|
+
this.type(extname(name));
|
|
614
613
|
}
|
|
615
614
|
|
|
616
|
-
this.set('Content-Disposition', contentDisposition(
|
|
615
|
+
this.set('Content-Disposition', contentDisposition.create(name));
|
|
617
616
|
|
|
618
617
|
return this;
|
|
619
618
|
};
|
|
@@ -784,12 +783,9 @@ res.cookie = function (name, value, options) {
|
|
|
784
783
|
/**
|
|
785
784
|
* Set the location header to `url`.
|
|
786
785
|
*
|
|
787
|
-
* The given `url` can also be "back", which redirects
|
|
788
|
-
* to the _Referrer_ or _Referer_ headers or "/".
|
|
789
|
-
*
|
|
790
786
|
* Examples:
|
|
791
787
|
*
|
|
792
|
-
* res.location('/foo/bar')
|
|
788
|
+
* res.location('/foo/bar');
|
|
793
789
|
* res.location('http://example.com');
|
|
794
790
|
* res.location('../login');
|
|
795
791
|
*
|
|
@@ -850,7 +846,8 @@ res.redirect = function redirect(url) {
|
|
|
850
846
|
|
|
851
847
|
html: function(){
|
|
852
848
|
var u = escapeHtml(address);
|
|
853
|
-
body = '
|
|
849
|
+
body = '<!DOCTYPE html><head><title>' + statuses.message[status] + '</title></head>'
|
|
850
|
+
+ '<body><p>' + statuses.message[status] + '. Redirecting to ' + u + '</p></body>'
|
|
854
851
|
},
|
|
855
852
|
|
|
856
853
|
default: function(){
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express",
|
|
3
3
|
"description": "Fast, unopinionated, minimalist web framework",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.3.0",
|
|
5
5
|
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Aaron Heckmann <aaron.heckmann+github@gmail.com>",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"accepts": "^2.0.0",
|
|
36
|
-
"body-parser": "^2.
|
|
37
|
-
"content-disposition": "^
|
|
38
|
-
"content-type": "^
|
|
36
|
+
"body-parser": "^2.3.0",
|
|
37
|
+
"content-disposition": "^2.0.1",
|
|
38
|
+
"content-type": "^2.0.0",
|
|
39
39
|
"cookie": "^0.7.1",
|
|
40
40
|
"cookie-signature": "^1.2.1",
|
|
41
41
|
"debug": "^4.4.0",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"on-finished": "^2.4.1",
|
|
52
52
|
"once": "^1.4.0",
|
|
53
53
|
"parseurl": "^1.3.3",
|
|
54
|
-
"proxy-addr": "^2.0.
|
|
55
|
-
"qs": "^6.
|
|
54
|
+
"proxy-addr": "^2.0.8",
|
|
55
|
+
"qs": "^6.16.0",
|
|
56
56
|
"range-parser": "^1.2.1",
|
|
57
57
|
"router": "^2.2.0",
|
|
58
58
|
"send": "^1.1.0",
|
|
59
59
|
"serve-static": "^2.2.0",
|
|
60
60
|
"statuses": "^2.0.1",
|
|
61
|
-
"type-is": "^2.0
|
|
61
|
+
"type-is": "^2.1.0",
|
|
62
62
|
"vary": "^1.1.2"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
"ejs": "^3.1.10",
|
|
70
70
|
"eslint": "8.47.0",
|
|
71
71
|
"express-session": "^1.18.1",
|
|
72
|
-
"hbs": "4.
|
|
72
|
+
"hbs": "4.3.1",
|
|
73
73
|
"marked": "^15.0.3",
|
|
74
74
|
"method-override": "3.0.0",
|
|
75
|
-
"mocha": "^
|
|
76
|
-
"morgan": "1.
|
|
75
|
+
"mocha": "^11.7.5",
|
|
76
|
+
"morgan": "1.12.1",
|
|
77
77
|
"nyc": "^17.1.0",
|
|
78
78
|
"pbkdf2-password": "1.2.1",
|
|
79
79
|
"supertest": "^6.3.0",
|
|
@@ -24,7 +24,7 @@ Caller Application → qs.stringify(obj, options) → Stringifying Engine → Ou
|
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
**Trust Boundaries:**
|
|
27
|
-
- **Input string (parse):** May come from untrusted sources (e.g., user input, network requests)
|
|
27
|
+
- **Input string (parse):** May come from untrusted sources (e.g., user input, network requests). `qs` defines its own key grammar, where bracket groups denote nesting, so the parameter names it derives are deliberately not the flat names produced by `URLSearchParams`, `node:querystring`, or a WHATWG-conformant parser. The parsed object, not the raw string, is the only thing a caller should make trust decisions about; see "Interpretation conflict" below.
|
|
28
28
|
- **Input object (stringify):** The calling application's own data, not a direct untrusted channel. May contain cycles (handled by the cycle detector). Deeply-nested non-cyclic input surfaces as a catchable synchronous `RangeError` (stack overflow), not unbounded resource consumption; callers that serialize externally-influenced objects should bound their depth/size beforehand.
|
|
29
29
|
- **Options:** Provided by the caller
|
|
30
30
|
- **Cycle Tracking:** Used only during stringification to detect and handle circular references
|
|
@@ -51,6 +51,7 @@ Caller Application → qs.stringify(obj, options) → Stringifying Engine → Ou
|
|
|
51
51
|
- **Information Disclosure:** Error messages may expose internal details or sensitive data.
|
|
52
52
|
- **Denial of Service:** Large or malformed input can exhaust memory or CPU.
|
|
53
53
|
- **Elevation of Privilege:** Prototype pollution can lead to unintended privilege escalation in the host application[3][4][8].
|
|
54
|
+
- **Interpretation conflict (out of scope):** An application that parses the same query string with two different parsers, and makes a trust decision on one result while consuming the other, can be attacked by any input the two parsers read differently. `qs`'s bracket grammar guarantees such inputs exist, so this is a property of the deployment, not a defect `qs` can remove. It is the calling application's responsibility to parse once and validate the parsed object.
|
|
54
55
|
|
|
55
56
|
### 6. Mitigation/Countermeasures
|
|
56
57
|
|
|
@@ -58,8 +59,9 @@ Caller Application → qs.stringify(obj, options) → Stringifying Engine → Ou
|
|
|
58
59
|
|---------------------------------------------------|---------------------|
|
|
59
60
|
| Tampering (malicious input, prototype pollution) | Strict input validation; keep `allowPrototypes: false` by default; use `plainObjects` for output; ensure builtins/globals are never modified by parse[4][8]. |
|
|
60
61
|
| Information Disclosure (error messages) | Generic error messages without stack traces or internal paths. |
|
|
61
|
-
| Denial of Service (memory/CPU exhaustion) | `arrayLimit`, `parameterLimit`, and depth limiting apply with safe defaults. Note that `arrayLimit` is a representation threshold (array vs. object), and `parameterLimit` bounds only the number of `&`-delimited parameters - neither caps the elements produced by `comma: true` splitting. For
|
|
62
|
+
| Denial of Service (memory/CPU exhaustion) | `arrayLimit`, `parameterLimit`, and depth limiting apply with safe defaults. Note that `arrayLimit` is a representation threshold (array vs. object), and `parameterLimit` bounds only the number of `&`-delimited parameters - neither caps the elements produced by `comma: true` splitting. For hard caps on the number of parameters and on each array's length, opt in to `throwOnLimitExceeded: true` (default `false`), which rejects a query string with more than `parameterLimit` parameters, or one that would produce any array longer than `arrayLimit`. `arrayLimit` applies to each array separately, including each parameter's comma-split value, so the total number of values can still reach `parameterLimit` times `arrayLimit`; always bound input size at the transport layer as well[7]. On the `stringify` side, the input is the caller's own object rather than an untrusted string, so unbounded nesting manifests as a catchable `RangeError` (stack overflow) rather than exhaustion; callers serializing externally-influenced objects should bound depth/size beforehand, and may opt into `stringify`'s `depth` option (default `Infinity`) for a deterministic, catchable error. |
|
|
62
63
|
| Elevation of Privilege (prototype pollution) | Keep `allowPrototypes: false`; validate options against allowlist; use `plainObjects` to avoid prototype pollution[4][8]. |
|
|
64
|
+
| Interpretation conflict (validate-then-use across two parsers) | None available inside `qs`, by construction: `qs` and a flat parser disagree about parameter names for well-formed input, so no hardening can make the two views equal. Parse untrusted input once, with `qs`, and apply deny lists, authorization, and signature checks to the parsed object rather than to raw key text. Text that `qs` cannot place in its grammar is currently dropped, so distinct raw names can share one parsed path ([#619](https://github.com/ljharb/qs/issues/619)). |
|
|
63
65
|
|
|
64
66
|
### 7. Risk Ranking
|
|
65
67
|
|
|
@@ -1,17 +1,41 @@
|
|
|
1
|
+
## **6.16.1**
|
|
2
|
+
- [Fix] `parse`: do not mutate an object input
|
|
3
|
+
- [Fix] `stringify`: stop re-encoding structural separator dots when `encodeDotInKeys` is set (#564)
|
|
4
|
+
- [Fix] `stringify`: `arrayFormat: 'comma'`: pass the full encoder arguments with `encodeValuesOnly`
|
|
5
|
+
- [Fix] `utils`: encode `+` as `%2B` in iso-8859-1 mode so values round-trip (#565)
|
|
6
|
+
- [Fix] parse: only convert top-level dots to brackets when allowDots is on (#621)
|
|
7
|
+
- [Fix] `stringify`: ignore inherited array format names (#622)
|
|
8
|
+
- [Fix] `stringify`: `arrayFormat: 'comma'`: do not throw on elements with no callable `toString`
|
|
9
|
+
- [Fix] `utils`: `merge`: seed an overflow container's index from its own keys, not just the source
|
|
10
|
+
- [Fix] `utils`: `merge`: keep a `strictMerge` conflict container's index and `arrayLimit` correct
|
|
11
|
+
- [Fix] `parse`: only treat `[]` as array syntax when it ends the key
|
|
12
|
+
- [Perf] `decode`: skip decoders when there is no percent sign (#583)
|
|
13
|
+
- [Robustness] `utils`: `merge`: apply `arrayLimit` to the two-element array built for colliding values
|
|
14
|
+
- [Robustness] `parse`: bound the nesting added by repeated `strictMerge` conflicts
|
|
15
|
+
- [Docs] document that `qs` and flat parsers disagree about parameter names
|
|
16
|
+
- [Docs] clarify that `throwOnLimitExceeded` limits each array, not the total number of values
|
|
17
|
+
- [Docs] clarify 6.14.1/6.15.2 parse bracket behavior change (#567, #568)
|
|
18
|
+
- [meta] fix changelog indents
|
|
19
|
+
- [actions] set least-privilege `cache-mode`
|
|
20
|
+
- [Tests] `utils`: `decode`: add missing cases
|
|
21
|
+
- [Tests] `parse`: characterize the `]=` split when an `=` precedes any bracket group (#620)
|
|
22
|
+
- [Tests] `parse`: `allowDots`: cover stray close brackets before a dot
|
|
23
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `eslint`, `tape`
|
|
24
|
+
|
|
1
25
|
## **6.16.0**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
26
|
+
- [New] `stringify`: add a `depth` option to bound recursion depth (default `Infinity`)
|
|
27
|
+
- [Fix] stringify: serialize Date values when a filter is provided
|
|
28
|
+
- [Fix] `parse`: enforce `arrayLimit` on comma groups under `[]=` when `throwOnLimitExceeded` is set
|
|
29
|
+
- [Fix] `parse`: flatten a collection appended to an overflowed array (#571)
|
|
30
|
+
- [Fix] `utils`: `isBuffer`: do not invoke a non-callable `constructor.isBuffer`
|
|
31
|
+
- [Fix] `stringify`: do not let `allowEmptyArrays` skip cycle detection (or drop own keys) on an empty array with own properties
|
|
32
|
+
- [Fix] `stringify`: encode dots in a top-level key with a primitive value when encodeDotInKeys is set (#562)
|
|
33
|
+
- [Docs] threat model: clarify `stringify` deep-nesting DoS is caller-bounded
|
|
34
|
+
- [Docs] clarify `arrayLimit` is a representation threshold, not an element-count cap
|
|
35
|
+
- [Tests] `parse`: remove a test that pinned `[]=` comma groups escaping `arrayLimit`
|
|
36
|
+
- [Tests] `stringify`: pin current `encodeDotInKeys` separator-dot behavior
|
|
37
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `eslint`
|
|
38
|
+
- [Dev Deps] update `eslint`, `evalmd`
|
|
15
39
|
|
|
16
40
|
## **6.15.3**
|
|
17
41
|
- [Fix] `parse`: enforce `throwOnLimitExceeded` for cumulative array growth via `combine`/`merge`
|
|
@@ -29,7 +53,7 @@
|
|
|
29
53
|
- [Fix] `stringify`: use configured `delimiter` after `charsetSentinel` (#555)
|
|
30
54
|
- [Fix] `stringify`: apply `formatter` to encoded key under `strictNullHandling` (#554)
|
|
31
55
|
- [Fix] `stringify`: skip null/undefined filter-array entries instead of crashing in `encoder` (#551)
|
|
32
|
-
- [Fix] `parse`: handle nested bracket groups and add regression tests (#530)
|
|
56
|
+
- [Fix] `parse`: handle nested bracket groups and add regression tests (#530); changes output for some unbalanced bracket keys (see #558)
|
|
33
57
|
- [readme] fix grammar (#550)
|
|
34
58
|
- [Dev Deps] update `@ljharb/eslint-config`
|
|
35
59
|
- [Tests] add regression tests for keys containing percent-encoded bracket text
|