@psnext/slingcli 3.5.20261007-3 → 3.5.20261019-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/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +12 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +94 -1589
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +12 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -7
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +2 -8
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +10 -10
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-websocket/package.json +4 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +11 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +6 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +6 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +13 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +9 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/CognitoIdentityServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/errors.js +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/errors.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/errors.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/errors.js +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/errors.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/SigninServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/SSOServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/errors.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/errors.d.ts +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/STSServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/errors.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/errors.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/SigninServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/errors.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/SSOServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/errors.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/errors.d.ts +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/STSServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/errors.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +4 -4
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +2 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js +21 -86
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js +3 -103
- package/node_modules/@earendil-works/pi-codemode/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-TFS67BSI.js → chunk-23QDZLZG.js} +20 -14
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-IB6ONE3U.js → chunk-QPFSTNX5.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{virtual-modules-P5ROWYIG.js → virtual-modules-GRXGP6ZA.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli-runtime.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Dispatcher.md +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Errors.md +101 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Fetch.md +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Interceptors.md +17 -9
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/index.md +22 -13
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/request.js +39 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/util.js +26 -40
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h1.js +127 -84
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h2.js +97 -21
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client.js +10 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool-base.js +117 -19
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool.js +99 -13
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/proxy-agent.js +34 -11
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/deduplication-handler.js +126 -52
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/redirect-handler.js +31 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/retry-handler.js +116 -24
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/cache.js +15 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/decompress.js +253 -73
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/util.js +21 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource.js +50 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/body.js +69 -53
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/headers.js +36 -33
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/index.js +54 -29
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/request.js +74 -79
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/util.js +7 -7
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/webidl/index.js +2 -14
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/connection.js +33 -12
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/receiver.js +27 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketstream.js +19 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/package.json +7 -5
- package/node_modules/@earendil-works/pi-coding-agent/package.json +2 -2
- package/node_modules/@hono/node-server/README.md +2 -0
- package/node_modules/@hono/node-server/dist/index.cjs +1 -1
- package/node_modules/@hono/node-server/dist/index.mjs +1 -1
- package/node_modules/@hono/node-server/dist/serve-static.cjs +2 -1
- package/node_modules/@hono/node-server/dist/serve-static.mjs +2 -1
- package/node_modules/@hono/node-server/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1695 -3
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +6 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/UnionSerde.js +26 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/common.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +8 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +102 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +8 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +8 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +13 -2
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +11 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/parseJsonBody.js +16 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/writeKey.js +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/UnionSerde.d.ts +24 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/common.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +16 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +24 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +15 -11
- package/node_modules/{@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json → @smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +7 -4
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +14 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +29 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +51 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +13 -9
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +30 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +60 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +21 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +38 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@smithy/core/package.json +2 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/util.d.ts +6 -3
- package/node_modules/content-disposition/README.md +105 -35
- package/node_modules/content-disposition/dist/index.d.ts +72 -0
- package/node_modules/content-disposition/dist/index.js +388 -0
- package/node_modules/content-disposition/dist/index.js.map +1 -0
- package/node_modules/content-disposition/package.json +31 -19
- package/node_modules/express/Readme.md +15 -9
- package/node_modules/express/lib/application.js +2 -2
- package/node_modules/express/lib/request.js +32 -19
- package/node_modules/express/lib/response.js +27 -30
- package/node_modules/express/node_modules/content-type/LICENSE +22 -0
- package/node_modules/express/node_modules/content-type/README.md +71 -0
- package/node_modules/express/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/express/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/express/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/express/node_modules/content-type/package.json +52 -0
- package/node_modules/express/package.json +10 -10
- package/node_modules/fast-uri/.github/workflows/release.yml +35 -0
- package/node_modules/fast-uri/README.md +8 -0
- package/node_modules/fast-uri/index.js +98 -18
- package/node_modules/fast-uri/lib/utils.js +52 -0
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fast-uri/test/host-delimiter-security.test.js +94 -0
- package/node_modules/fast-uri/test/relative-normalization-security.test.js +156 -0
- package/node_modules/fast-uri/test/reserved-path-normalization.test.js +32 -4
- package/node_modules/fast-uri/test/scheme-validation.test.js +53 -14
- package/node_modules/ip-address/README.md +70 -70
- package/node_modules/ip-address/dist/ipv6.js +7 -4
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts +3 -0
- package/node_modules/ip-address/dist/v6/constants.js +3 -0
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/ip-address/package.json +2 -1
- package/node_modules/jose/README.md +2 -2
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +5 -4
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +4 -4
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +5 -4
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +5 -5
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +5 -4
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +5 -5
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +5 -4
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +5 -5
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +5 -4
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +6 -5
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +9 -6
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +7 -5
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +7 -6
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +1 -1
- package/node_modules/jose/dist/types/jwt/sign.d.ts +1 -1
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +1 -1
- package/node_modules/jose/dist/types/jwt/verify.d.ts +3 -5
- package/node_modules/jose/dist/types/key/export.d.ts +1 -1
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +1 -1
- package/node_modules/jose/dist/types/key/import.d.ts +2 -2
- package/node_modules/jose/dist/types/types.d.ts +165 -107
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +2 -2
- package/node_modules/jose/dist/types/util/errors.d.ts +1 -1
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +3 -3
- package/node_modules/jose/dist/webapi/jwk/thumbprint.js +8 -8
- package/node_modules/jose/dist/webapi/jwks/local.js +2 -1
- package/node_modules/jose/dist/webapi/jwks/remote.js +4 -4
- package/node_modules/jose/dist/webapi/jws/general/sign.js +3 -3
- package/node_modules/jose/dist/webapi/jws/general/verify.js +3 -3
- package/node_modules/jose/dist/webapi/jwt/encrypt.js +2 -2
- package/node_modules/jose/dist/webapi/jwt/sign.js +2 -2
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +3 -3
- package/node_modules/jose/dist/webapi/key/generate_secret.js +4 -4
- package/node_modules/jose/dist/webapi/lib/asn1.js +2 -2
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +4 -4
- package/node_modules/jose/dist/webapi/lib/content_encryption.js +8 -8
- package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +14 -14
- package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +3 -3
- package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +2 -2
- package/node_modules/jose/dist/webapi/lib/jws_sign.js +11 -11
- package/node_modules/jose/dist/webapi/lib/jws_verify.js +19 -16
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +44 -43
- package/node_modules/jose/dist/webapi/lib/key.js +4 -4
- package/node_modules/jose/dist/webapi/lib/key_management.js +17 -17
- package/node_modules/jose/dist/webapi/lib/validate.js +10 -10
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +12 -12
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +5 -5
- package/node_modules/jose/package.json +1 -1
- package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
- package/node_modules/qs/CHANGELOG.md +38 -14
- package/node_modules/qs/README.md +31 -3
- package/node_modules/qs/dist/qs.js +20 -20
- package/node_modules/qs/lib/parse.js +94 -4
- package/node_modules/qs/lib/stringify.js +4 -4
- package/node_modules/qs/lib/utils.js +130 -6
- package/node_modules/qs/package.json +4 -4
- package/node_modules/qs/test/parse.js +174 -0
- package/node_modules/qs/test/stringify.js +263 -33
- package/node_modules/qs/test/utils.js +184 -0
- package/node_modules/undici/docs/docs/api/Client.md +2 -0
- package/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/undici/lib/core/symbols.js +1 -0
- package/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
- package/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
- package/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
- package/node_modules/undici/lib/handler/cache-handler.js +48 -0
- package/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
- package/node_modules/undici/lib/handler/redirect-handler.js +8 -1
- package/node_modules/undici/lib/interceptor/decompress.js +15 -5
- package/node_modules/undici/lib/web/cookies/index.js +3 -1
- package/node_modules/undici/lib/web/cookies/parse.js +138 -137
- package/node_modules/undici/lib/web/cookies/util.js +21 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
- package/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/undici/lib/web/fetch/index.js +3 -3
- package/node_modules/undici/lib/web/infra/index.js +14 -0
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/undici/lib/web/websocket/receiver.js +13 -0
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/client.d.ts +14 -0
- 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/package.json +5 -4
- package/slingshot/index.js +124 -124
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
- package/node_modules/content-disposition/index.js +0 -536
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/needsReviver.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -0
- /package/node_modules/{@aws-sdk/core/dist-types/submodules/protocols/json → @smithy/core/dist-types/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -0
|
@@ -16,8 +16,8 @@ function secs(str) {
|
|
|
16
16
|
typeof str != "string" && invalidDuration();
|
|
17
17
|
const matched = REGEX.exec(str);
|
|
18
18
|
(!matched || matched[4] && matched[1]) && invalidDuration();
|
|
19
|
-
const value = parseFloat(matched[2]),
|
|
20
|
-
return Number.isFinite(
|
|
19
|
+
const value = parseFloat(matched[2]), durationSeconds = Math.round(value * multipliers[matched[3][0].toLowerCase()]);
|
|
20
|
+
return Number.isFinite(durationSeconds) || invalidDuration(), matched[1] === "-" || matched[4] === "ago" ? -durationSeconds : durationSeconds;
|
|
21
21
|
}
|
|
22
22
|
function validateInput(label, input) {
|
|
23
23
|
if (!Number.isFinite(input))
|
|
@@ -39,34 +39,35 @@ const normalizeTyp = (value) => {
|
|
|
39
39
|
const normalized = value.toLowerCase();
|
|
40
40
|
return value.includes("/") ? normalized : `application/${normalized}`;
|
|
41
41
|
}, checkAudiencePresence = (audPayload, audOption) => typeof audPayload == "string" ? audOption.includes(audPayload) : Array.isArray(audPayload) ? audOption.some((aud) => audPayload.includes(aud)) : !1;
|
|
42
|
-
function validateNumericDate(
|
|
43
|
-
const value =
|
|
42
|
+
function validateNumericDate(claimsSet, claim, required = !1) {
|
|
43
|
+
const value = claimsSet[claim];
|
|
44
44
|
if (!(value === void 0 && !required)) {
|
|
45
45
|
if (typeof value != "number")
|
|
46
|
-
throw new JWTClaimValidationFailed(`"${claim}" claim must be a number`,
|
|
46
|
+
throw new JWTClaimValidationFailed(`"${claim}" claim must be a number`, claimsSet, claim, "invalid");
|
|
47
47
|
return value;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function unexpectedClaim(
|
|
51
|
-
throw new JWTClaimValidationFailed(`unexpected "${claim}" claim value`,
|
|
50
|
+
function unexpectedClaim(claimsSet, claim) {
|
|
51
|
+
throw new JWTClaimValidationFailed(`unexpected "${claim}" claim value`, claimsSet, claim, checkFailed);
|
|
52
52
|
}
|
|
53
|
-
function validateClaimsSet(protectedHeader,
|
|
54
|
-
let
|
|
53
|
+
function validateClaimsSet(protectedHeader, claimsSetBytes, options = {}) {
|
|
54
|
+
let claimsSet;
|
|
55
55
|
try {
|
|
56
|
-
|
|
57
|
-
} catch {
|
|
56
|
+
claimsSet = JSON.parse(strictDecoder.decode(claimsSetBytes));
|
|
57
|
+
} catch (cause) {
|
|
58
|
+
throw new JWTInvalid("JWT Claims Set must be a top-level JSON object", { cause });
|
|
58
59
|
}
|
|
59
|
-
if (!isObject(
|
|
60
|
+
if (!isObject(claimsSet))
|
|
60
61
|
throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");
|
|
61
62
|
const { typ } = options;
|
|
62
63
|
if (typ !== void 0 && (typeof protectedHeader.typ != "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ)))
|
|
63
|
-
throw new JWTClaimValidationFailed('unexpected "typ" JWT header value',
|
|
64
|
+
throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', claimsSet, "typ", checkFailed);
|
|
64
65
|
const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options, presenceCheck = [...requiredClaims];
|
|
65
66
|
maxTokenAge !== void 0 && presenceCheck.push("iat"), audience !== void 0 && presenceCheck.push("aud"), subject !== void 0 && presenceCheck.push("sub"), issuer !== void 0 && presenceCheck.push("iss");
|
|
66
67
|
for (const claim of new Set(presenceCheck.reverse()))
|
|
67
|
-
if (!Object.hasOwn(
|
|
68
|
-
throw new JWTClaimValidationFailed(`missing required "${claim}" claim`,
|
|
69
|
-
issuer !== void 0 && !(Array.isArray(issuer) ? issuer : [issuer]).includes(
|
|
68
|
+
if (!Object.hasOwn(claimsSet, claim))
|
|
69
|
+
throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, claimsSet, claim, "missing");
|
|
70
|
+
issuer !== void 0 && !(Array.isArray(issuer) ? issuer : [issuer]).includes(claimsSet.iss) && unexpectedClaim(claimsSet, "iss"), subject !== void 0 && claimsSet.sub !== subject && unexpectedClaim(claimsSet, "sub"), audience !== void 0 && !checkAudiencePresence(claimsSet.aud, typeof audience == "string" ? [audience] : audience) && unexpectedClaim(claimsSet, "aud");
|
|
70
71
|
const { clockTolerance } = options;
|
|
71
72
|
let tolerance = 0;
|
|
72
73
|
if (typeof clockTolerance == "string")
|
|
@@ -77,70 +78,70 @@ function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {
|
|
|
77
78
|
tolerance = clockTolerance;
|
|
78
79
|
}
|
|
79
80
|
validateInput("clockTolerance option", tolerance);
|
|
80
|
-
const { currentDate } = options, now = validateInput("currentDate option", epoch(currentDate === void 0 ? /* @__PURE__ */ new Date() : currentDate)), iat = validateNumericDate(
|
|
81
|
+
const { currentDate } = options, now = validateInput("currentDate option", epoch(currentDate === void 0 ? /* @__PURE__ */ new Date() : currentDate)), iat = validateNumericDate(claimsSet, "iat", maxTokenAge !== void 0), nbf = validateNumericDate(claimsSet, "nbf");
|
|
81
82
|
if (nbf !== void 0 && nbf > now + tolerance)
|
|
82
|
-
throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed',
|
|
83
|
-
const exp = validateNumericDate(
|
|
83
|
+
throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', claimsSet, "nbf", checkFailed);
|
|
84
|
+
const exp = validateNumericDate(claimsSet, "exp");
|
|
84
85
|
if (exp !== void 0 && exp <= now - tolerance)
|
|
85
|
-
throw new JWTExpired('"exp" claim timestamp check failed',
|
|
86
|
+
throw new JWTExpired('"exp" claim timestamp check failed', claimsSet, "exp", checkFailed);
|
|
86
87
|
if (maxTokenAge !== void 0) {
|
|
87
88
|
const age = now - iat, max = validateInput("maxTokenAge option", typeof maxTokenAge == "number" ? maxTokenAge : secs(maxTokenAge));
|
|
88
89
|
if (age - tolerance > max)
|
|
89
|
-
throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)',
|
|
90
|
+
throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', claimsSet, "iat", checkFailed);
|
|
90
91
|
if (age < -tolerance)
|
|
91
|
-
throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',
|
|
92
|
+
throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', claimsSet, "iat", checkFailed);
|
|
92
93
|
}
|
|
93
|
-
return
|
|
94
|
+
return claimsSet;
|
|
94
95
|
}
|
|
95
|
-
let
|
|
96
|
-
function
|
|
97
|
-
return
|
|
96
|
+
let producerClaimsSets;
|
|
97
|
+
function producerClaimsSet(producer) {
|
|
98
|
+
return producerClaimsSets.get(producer);
|
|
98
99
|
}
|
|
99
|
-
function
|
|
100
|
-
const
|
|
100
|
+
function jwtClaimsSetBytes(producer) {
|
|
101
|
+
const claimsSet = producerClaimsSet(producer);
|
|
101
102
|
for (const claim of ["iat", "nbf", "exp"]) {
|
|
102
|
-
const value =
|
|
103
|
+
const value = claimsSet[claim];
|
|
103
104
|
if (typeof value == "number" && !Number.isFinite(value))
|
|
104
105
|
throw new TypeError(`"${claim}" claim must be a finite number`);
|
|
105
106
|
}
|
|
106
|
-
return encoder.encode(JSON.stringify(
|
|
107
|
+
return encoder.encode(JSON.stringify(claimsSet));
|
|
107
108
|
}
|
|
108
109
|
function jwtClaim(producer, claim) {
|
|
109
|
-
return
|
|
110
|
+
return producerClaimsSet(producer)[claim];
|
|
110
111
|
}
|
|
111
112
|
class JWTClaimsBuilder {
|
|
112
|
-
constructor(
|
|
113
|
-
if (!isObject(
|
|
113
|
+
constructor(claimsSet = {}) {
|
|
114
|
+
if (!isObject(claimsSet))
|
|
114
115
|
throw new TypeError("JWT Claims Set MUST be an object");
|
|
115
|
-
(
|
|
116
|
+
(producerClaimsSets ||= /* @__PURE__ */ new WeakMap()).set(this, structuredClone(claimsSet));
|
|
116
117
|
}
|
|
117
118
|
setIssuer(value) {
|
|
118
|
-
return validateStringClaim("iss", value),
|
|
119
|
+
return validateStringClaim("iss", value), producerClaimsSet(this).iss = value, this;
|
|
119
120
|
}
|
|
120
121
|
setSubject(value) {
|
|
121
|
-
return validateStringClaim("sub", value),
|
|
122
|
+
return validateStringClaim("sub", value), producerClaimsSet(this).sub = value, this;
|
|
122
123
|
}
|
|
123
124
|
setAudience(value) {
|
|
124
|
-
return validateAudienceClaim(value),
|
|
125
|
+
return validateAudienceClaim(value), producerClaimsSet(this).aud = value, this;
|
|
125
126
|
}
|
|
126
127
|
setJti(value) {
|
|
127
|
-
return validateStringClaim("jti", value),
|
|
128
|
+
return validateStringClaim("jti", value), producerClaimsSet(this).jti = value, this;
|
|
128
129
|
}
|
|
129
130
|
setNotBefore(value) {
|
|
130
|
-
return
|
|
131
|
+
return producerClaimsSet(this).nbf = numericDate(value, "setNotBefore"), this;
|
|
131
132
|
}
|
|
132
133
|
setExpirationTime(value) {
|
|
133
|
-
return
|
|
134
|
+
return producerClaimsSet(this).exp = numericDate(value, "setExpirationTime"), this;
|
|
134
135
|
}
|
|
135
136
|
setIssuedAt(value) {
|
|
136
|
-
const
|
|
137
|
-
return value === void 0 ?
|
|
137
|
+
const claimsSet = producerClaimsSet(this);
|
|
138
|
+
return value === void 0 ? claimsSet.iat = epoch(/* @__PURE__ */ new Date()) : typeof value == "string" ? claimsSet.iat = validateInput("setIssuedAt", epoch(/* @__PURE__ */ new Date()) + secs(value)) : claimsSet.iat = numericDate(value, "setIssuedAt"), this;
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
141
|
export {
|
|
141
142
|
JWTClaimsBuilder,
|
|
142
143
|
jwtClaim,
|
|
143
|
-
|
|
144
|
+
jwtClaimsSetBytes,
|
|
144
145
|
secs,
|
|
145
146
|
validateClaimsSet
|
|
146
147
|
};
|
|
@@ -17,15 +17,15 @@ const tag = (key) => key[Symbol.toStringTag], jwkMatchesOp = (entry, key, usage)
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
async function prepareKey(entry, key, usage) {
|
|
20
|
-
const { alg, secret } = entry,
|
|
20
|
+
const { alg, secret } = entry, requiresPrivateKey = usage === "decrypt" || usage === "sign";
|
|
21
21
|
if (secret && key instanceof Uint8Array)
|
|
22
22
|
return key;
|
|
23
23
|
let normalized, keyObject;
|
|
24
24
|
if (isObject(key)) {
|
|
25
25
|
if (normalized = normalizeJwk(key), typeof normalized.kty != "string")
|
|
26
26
|
throw invalidKeyType(alg, key, secret);
|
|
27
|
-
if (!(secret ? normalized.kty === "oct" && typeof normalized.k == "string" : normalized.kty !== "oct" && (
|
|
28
|
-
throw new TypeError(secret ? 'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present' : `JSON Web Key for this operation must be a ${
|
|
27
|
+
if (!(secret ? normalized.kty === "oct" && typeof normalized.k == "string" : normalized.kty !== "oct" && (requiresPrivateKey ? normalized.kty === "AKP" && typeof normalized.priv == "string" || typeof normalized.d == "string" : normalized.d === void 0 && normalized.priv === void 0)))
|
|
28
|
+
throw new TypeError(secret ? 'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present' : `JSON Web Key for this operation must be a ${requiresPrivateKey ? "private" : "public"} JWK`);
|
|
29
29
|
if (jwkMatchesOp(entry, normalized, usage), normalized.kty === "oct")
|
|
30
30
|
return decode(normalized.k);
|
|
31
31
|
if (!Object.isFrozen(key)) {
|
|
@@ -35,7 +35,7 @@ async function prepareKey(entry, key, usage) {
|
|
|
35
35
|
} else {
|
|
36
36
|
if (!isKeyLike(key))
|
|
37
37
|
throw invalidKeyType(alg, key, secret);
|
|
38
|
-
const expectedType = secret ? "secret" :
|
|
38
|
+
const expectedType = secret ? "secret" : requiresPrivateKey ? "private" : "public";
|
|
39
39
|
if (key.type !== expectedType && (secret || ["secret", "public", "private"].includes(key.type)))
|
|
40
40
|
throw new TypeError(`${tag(key)} instances must be of type "${expectedType}" for the ${alg} algorithm`);
|
|
41
41
|
if (isCryptoKey(key))
|
|
@@ -26,32 +26,32 @@ async function deriveKey(p2s, alg, p2c, key) {
|
|
|
26
26
|
throw new JWEInvalid("PBES2 Salt Input must be 8 or more octets");
|
|
27
27
|
if (!Number.isSafeInteger(p2c) || Math.sign(p2c) !== 1)
|
|
28
28
|
throw new JWEInvalid("PBES2 Count Input must be a positive integer");
|
|
29
|
-
const salt = concat(encode(alg), Uint8Array.of(0), p2s),
|
|
29
|
+
const salt = concat(encode(alg), Uint8Array.of(0), p2s), keyLengthBits = parseInt(alg.slice(13, 16), 10), subtleAlg = {
|
|
30
30
|
hash: `SHA-${alg.slice(8, 11)}`,
|
|
31
31
|
iterations: p2c,
|
|
32
32
|
name: "PBKDF2",
|
|
33
33
|
salt
|
|
34
34
|
}, cryptoKey = await rawKey(key, jweAlgorithm(alg).subtle, "deriveBits");
|
|
35
|
-
return new Uint8Array(await crypto.subtle.deriveBits(subtleAlg, cryptoKey,
|
|
35
|
+
return new Uint8Array(await crypto.subtle.deriveBits(subtleAlg, cryptoKey, keyLengthBits));
|
|
36
36
|
}
|
|
37
37
|
function lengthAndInput(input) {
|
|
38
38
|
return concat(uint32be(input.length), input);
|
|
39
39
|
}
|
|
40
|
-
async function concatKdf(Z,
|
|
41
|
-
const dkLen =
|
|
40
|
+
async function concatKdf(Z, keyDataLength, OtherInfo) {
|
|
41
|
+
const dkLen = keyDataLength >> 3, hashLen = 32, reps = Math.ceil(dkLen / hashLen), dk = new Uint8Array(reps * hashLen);
|
|
42
42
|
for (let i = 1; i <= reps; i++) {
|
|
43
43
|
const hashResult = await digest("sha256", concat(uint32be(i), Z, OtherInfo));
|
|
44
44
|
dk.set(hashResult, (i - 1) * hashLen);
|
|
45
45
|
}
|
|
46
46
|
return dk.slice(0, dkLen);
|
|
47
47
|
}
|
|
48
|
-
async function ecdhesDeriveKey(publicKey, privateKey,
|
|
48
|
+
async function ecdhesDeriveKey(publicKey, privateKey, algorithmId, keyDataLength, apu = new Uint8Array(), apv = new Uint8Array()) {
|
|
49
49
|
checkEcdhCryptoKey(publicKey), checkEcdhCryptoKey(privateKey, "deriveBits");
|
|
50
|
-
const otherInfo = concat(lengthAndInput(encode(
|
|
50
|
+
const otherInfo = concat(lengthAndInput(encode(algorithmId)), lengthAndInput(apu), lengthAndInput(apv), uint32be(keyDataLength)), Z = new Uint8Array(await crypto.subtle.deriveBits({
|
|
51
51
|
name: publicKey.algorithm.name,
|
|
52
52
|
public: publicKey
|
|
53
53
|
}, privateKey, publicKey.algorithm.name === "X25519" ? 256 : Math.ceil(parseInt(publicKey.algorithm.namedCurve.slice(-3), 10) / 8) << 3));
|
|
54
|
-
return concatKdf(Z,
|
|
54
|
+
return concatKdf(Z, keyDataLength, otherInfo);
|
|
55
55
|
}
|
|
56
56
|
function assertEcdhKey(key) {
|
|
57
57
|
assertCryptoKey(key);
|
|
@@ -100,10 +100,10 @@ async function decryptKeyManagement(entry, enc, key, encryptedKey, joseHeader, m
|
|
|
100
100
|
assertEcdhKey(key);
|
|
101
101
|
const ephemeralPublicKey = await jwkToKey(entry, epk), partyUInfo = partyInfo(joseHeader, "apu"), partyVInfo = partyInfo(joseHeader, "apv");
|
|
102
102
|
checkPartyInfo(partyUInfo, partyVInfo);
|
|
103
|
-
const
|
|
103
|
+
const derivedKey = await ecdhesDeriveKey(ephemeralPublicKey, key, direct ? enc.alg : alg, direct ? enc.cekBits : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo);
|
|
104
104
|
if (direct)
|
|
105
|
-
return
|
|
106
|
-
key =
|
|
105
|
+
return derivedKey;
|
|
106
|
+
key = derivedKey;
|
|
107
107
|
break;
|
|
108
108
|
}
|
|
109
109
|
case "RSA-OAEP":
|
|
@@ -153,19 +153,19 @@ async function encryptKeyManagement(entry, enc, inputKey, joseHeader, providedCe
|
|
|
153
153
|
providedApu !== void 0 && assertUint8Array(providedApu, '"apu"'), providedApv !== void 0 && assertUint8Array(providedApv, '"apv"');
|
|
154
154
|
const apu = providedApu ?? partyInfo(joseHeader, "apu"), apv = providedApv ?? partyInfo(joseHeader, "apv");
|
|
155
155
|
checkPartyInfo(apu, apv);
|
|
156
|
-
let
|
|
157
|
-
providedParameters.epk !== void 0 ?
|
|
156
|
+
let ephemeralPrivateKey;
|
|
157
|
+
providedParameters.epk !== void 0 ? ephemeralPrivateKey = await prepareKey(entry, providedParameters.epk, "decrypt") : ephemeralPrivateKey = (await crypto.subtle.generateKey(key.algorithm, !0, ["deriveBits"])).privateKey;
|
|
158
158
|
const subtle = crypto.subtle;
|
|
159
|
-
let exportableEpk =
|
|
159
|
+
let exportableEpk = ephemeralPrivateKey;
|
|
160
160
|
if (!exportableEpk.extractable) {
|
|
161
161
|
if (typeof subtle.getPublicKey != "function")
|
|
162
162
|
throw new TypeError('CryptoKey for "epk" must be extractable');
|
|
163
|
-
exportableEpk = await subtle.getPublicKey(
|
|
163
|
+
exportableEpk = await subtle.getPublicKey(ephemeralPrivateKey, []);
|
|
164
164
|
}
|
|
165
|
-
const { x, y, crv, kty } = await subtle.exportKey("jwk", exportableEpk), direct = mode === "direct-key-agreement",
|
|
165
|
+
const { x, y, crv, kty } = await subtle.exportKey("jwk", exportableEpk), direct = mode === "direct-key-agreement", derivedKey = await ecdhesDeriveKey(key, ephemeralPrivateKey, direct ? enc.alg : alg, direct ? enc.cekBits : parseInt(alg.slice(-5, -2), 10), apu, apv), epk = { x, crv, kty };
|
|
166
166
|
if (kty === "EC" && (epk.y = y), parameters = { epk }, providedApu !== void 0 && (parameters.apu = b64u(providedApu)), providedApv !== void 0 && (parameters.apv = b64u(providedApv)), direct)
|
|
167
|
-
return [
|
|
168
|
-
key =
|
|
167
|
+
return [derivedKey, void 0, parameters];
|
|
168
|
+
key = derivedKey;
|
|
169
169
|
break;
|
|
170
170
|
}
|
|
171
171
|
case "RSA-OAEP": {
|
|
@@ -32,23 +32,23 @@ function assertNotSet(value, name) {
|
|
|
32
32
|
function decodeBase64url(value, label, ErrorClass) {
|
|
33
33
|
try {
|
|
34
34
|
return decode(value);
|
|
35
|
-
} catch {
|
|
36
|
-
throw new ErrorClass(`Failed to base64url decode the ${label}
|
|
35
|
+
} catch (cause) {
|
|
36
|
+
throw new ErrorClass(`Failed to base64url decode the ${label}`, { cause });
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function encodeAsciiMember(value, label, ErrorClass) {
|
|
40
40
|
try {
|
|
41
41
|
return encode(value);
|
|
42
|
-
} catch {
|
|
43
|
-
throw new ErrorClass(`The ${label} is not a valid base64url string
|
|
42
|
+
} catch (cause) {
|
|
43
|
+
throw new ErrorClass(`The ${label} is not a valid base64url string`, { cause });
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function parseJoseHeader(
|
|
46
|
+
function parseJoseHeader(encodedProtectedHeader, ErrorClass, message) {
|
|
47
47
|
let parsed;
|
|
48
48
|
try {
|
|
49
|
-
parsed = JSON.parse(strictDecoder.decode(decode(
|
|
50
|
-
} catch {
|
|
51
|
-
throw new ErrorClass(message);
|
|
49
|
+
parsed = JSON.parse(strictDecoder.decode(decode(encodedProtectedHeader)));
|
|
50
|
+
} catch (cause) {
|
|
51
|
+
throw new ErrorClass(message, { cause });
|
|
52
52
|
}
|
|
53
53
|
if (!isObject(parsed))
|
|
54
54
|
throw new ErrorClass(message);
|
|
@@ -109,7 +109,7 @@ export {
|
|
|
109
109
|
assertNotSet,
|
|
110
110
|
assertUint8Array,
|
|
111
111
|
decodeBase64url,
|
|
112
|
-
|
|
112
|
+
encodeAsciiMember,
|
|
113
113
|
isDisjoint,
|
|
114
114
|
isJwkSet,
|
|
115
115
|
isObject,
|
|
@@ -5,28 +5,28 @@ import { JWTInvalid } from "./errors.js";
|
|
|
5
5
|
function decodeJwt(jwt) {
|
|
6
6
|
if (typeof jwt != "string")
|
|
7
7
|
throw new JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
8
|
-
const { 1:
|
|
8
|
+
const { 1: encodedPayload, length } = jwt.split(".");
|
|
9
9
|
if (length === 5)
|
|
10
10
|
throw new JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");
|
|
11
11
|
if (length !== 3)
|
|
12
12
|
throw new JWTInvalid("Invalid JWT");
|
|
13
|
-
if (!
|
|
13
|
+
if (!encodedPayload)
|
|
14
14
|
throw new JWTInvalid("JWTs must contain a payload");
|
|
15
|
-
let
|
|
15
|
+
let claimsSetBytes;
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch {
|
|
19
|
-
throw new JWTInvalid("Failed to base64url decode the payload");
|
|
17
|
+
claimsSetBytes = b64u(encodedPayload);
|
|
18
|
+
} catch (cause) {
|
|
19
|
+
throw new JWTInvalid("Failed to base64url decode the payload", { cause });
|
|
20
20
|
}
|
|
21
|
-
let
|
|
21
|
+
let claimsSet;
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch {
|
|
25
|
-
throw new JWTInvalid("Failed to parse the decoded payload as JSON");
|
|
23
|
+
claimsSet = JSON.parse(strictDecoder.decode(claimsSetBytes));
|
|
24
|
+
} catch (cause) {
|
|
25
|
+
throw new JWTInvalid("Failed to parse the decoded payload as JSON", { cause });
|
|
26
26
|
}
|
|
27
|
-
if (!isObject(
|
|
27
|
+
if (!isObject(claimsSet))
|
|
28
28
|
throw new JWTInvalid("Invalid JWT Claims Set");
|
|
29
|
-
return
|
|
29
|
+
return claimsSet;
|
|
30
30
|
}
|
|
31
31
|
export {
|
|
32
32
|
decodeJwt
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { parseJoseHeader } from "../lib/validate.js";
|
|
2
2
|
function decodeProtectedHeader(token) {
|
|
3
|
-
let
|
|
3
|
+
let encodedProtectedHeader;
|
|
4
4
|
if (typeof token == "string") {
|
|
5
5
|
const parts = token.split(".");
|
|
6
|
-
(parts.length === 3 || parts.length === 5) && ([
|
|
6
|
+
(parts.length === 3 || parts.length === 5) && ([encodedProtectedHeader] = parts);
|
|
7
7
|
} else if (typeof token == "object" && token)
|
|
8
8
|
if ("protected" in token)
|
|
9
|
-
|
|
9
|
+
encodedProtectedHeader = token.protected;
|
|
10
10
|
else
|
|
11
11
|
throw new TypeError("Token does not contain a Protected Header");
|
|
12
12
|
const invalid = "Invalid Token or Protected Header formatting";
|
|
13
|
-
if (typeof
|
|
13
|
+
if (typeof encodedProtectedHeader != "string" || !encodedProtectedHeader)
|
|
14
14
|
throw new TypeError(invalid);
|
|
15
|
-
return parseJoseHeader(
|
|
15
|
+
return parseJoseHeader(encodedProtectedHeader, TypeError, invalid);
|
|
16
16
|
}
|
|
17
17
|
export {
|
|
18
18
|
decodeProtectedHeader
|
|
@@ -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
|
|
@@ -85,6 +85,23 @@ assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), {
|
|
|
85
85
|
});
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
Since v6.14.1 and v6.15.2, `parse` interprets nested bracket groups more consistently. Query strings with unbalanced `[`/`]` can produce different results than in 6.15.1; see [#558](https://github.com/ljharb/qs/issues/558).
|
|
89
|
+
|
|
90
|
+
Because of that bracket grammar,
|
|
91
|
+
**qs** does not agree with `URLSearchParams`,
|
|
92
|
+
`node:querystring`, or any other flat parser about what the "name" of a parameter is,
|
|
93
|
+
and it never has.
|
|
94
|
+
`URLSearchParams` reads `'foo[bar]=baz'` as one flat name `foo[bar]`;
|
|
95
|
+
**qs** reads it as the path `foo.bar`.
|
|
96
|
+
Text that **qs**'s grammar cannot place,
|
|
97
|
+
such as the `extra` in `'foo[bar]extra=baz'`,
|
|
98
|
+
is currently dropped, so several distinct flat names can resolve to the same **qs** path
|
|
99
|
+
(see [#619](https://github.com/ljharb/qs/issues/619)).
|
|
100
|
+
|
|
101
|
+
So validating, authorizing, filtering,
|
|
102
|
+
or signing a query string with one parser and then consuming it with another is unsafe: a deny list or signature computed over `URLSearchParams` names does not constrain what **qs** will produce from the same string.
|
|
103
|
+
Parse the input once, with **qs**, and apply your checks to the resulting object.
|
|
104
|
+
|
|
88
105
|
By default, when nesting objects **qs** will only parse up to 5 children deep.
|
|
89
106
|
This means if you attempt to parse a string like `'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:
|
|
90
107
|
|
|
@@ -135,7 +152,7 @@ var limited = qs.parse('a=b&c=d', { parameterLimit: 1 });
|
|
|
135
152
|
assert.deepEqual(limited, { a: 'b' });
|
|
136
153
|
```
|
|
137
154
|
|
|
138
|
-
If you want an error to be thrown whenever
|
|
155
|
+
If you want an error to be thrown whenever a limit is exceeded (eg, `parameterLimit`, `arrayLimit`), set the `throwOnLimitExceeded` option to `true`. This option will generate a descriptive error if the query string exceeds a configured limit.
|
|
139
156
|
```javascript
|
|
140
157
|
try {
|
|
141
158
|
qs.parse('a=1&b=2&c=3&d=4', { parameterLimit: 3, throwOnLimitExceeded: true });
|
|
@@ -147,7 +164,7 @@ try {
|
|
|
147
164
|
|
|
148
165
|
When `throwOnLimitExceeded` is set to `false` (default), **qs** will parse up to the specified `parameterLimit` and ignore the rest without throwing an error.
|
|
149
166
|
|
|
150
|
-
Note that `parameterLimit` only bounds the number of `&`-delimited parameters; it does not limit how many values a single parameter expands into. In particular, when `comma: true` is enabled, a single parameter's value is split on commas into arbitrarily many elements, which `parameterLimit` does not constrain.
|
|
167
|
+
Note that `parameterLimit` only bounds the number of `&`-delimited parameters; it does not limit how many values a single parameter expands into. In particular, when `comma: true` is enabled, a single parameter's value is split on commas into arbitrarily many elements, which `parameterLimit` does not constrain. Setting `throwOnLimitExceeded: true` (see `arrayLimit` below) makes **qs** reject a query string with more than `parameterLimit` parameters, one that uses an array index of `arrayLimit` or greater, or one that would produce any array longer than `arrayLimit`, including an array produced by comma splitting. `arrayLimit` applies to each array separately, including each parameter's comma-split value, so the total number of values across all parameters can still reach `parameterLimit` times `arrayLimit`, which is 20,000 at the default limits; always bound the input size at the transport layer as well (e.g. an HTTP body-size limit).
|
|
151
168
|
|
|
152
169
|
To bypass the leading question mark, use `ignoreQueryPrefix`:
|
|
153
170
|
|
|
@@ -293,6 +310,8 @@ assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] });
|
|
|
293
310
|
Any array members with an index of `20` or greater will instead be converted to an object with the index as the key.
|
|
294
311
|
This is needed to handle cases when someone sent, for example, `a[999999999]` and it will take significant time to iterate over this huge array.
|
|
295
312
|
|
|
313
|
+
Since v6.14.1 and v6.15.2, the arrayLimit now applies to arrays specified using both the `[]` and `[0]` syntaxes.
|
|
314
|
+
|
|
296
315
|
```javascript
|
|
297
316
|
var withMaxIndex = qs.parse('a[100]=b');
|
|
298
317
|
assert.deepEqual(withMaxIndex, { a: { '100': 'b' } });
|
|
@@ -317,7 +336,7 @@ try {
|
|
|
317
336
|
|
|
318
337
|
When `throwOnLimitExceeded` is set to `false` (default), **qs** will parse up to the specified `arrayLimit` and if the limit is exceeded, the array will instead be converted to an object with the index as the key.
|
|
319
338
|
|
|
320
|
-
Note that `arrayLimit` is a *representation* threshold that controls when a numerically-indexed collection switches from an array to an object
|
|
339
|
+
Note that `arrayLimit` is a *representation* threshold that controls when a numerically-indexed collection switches from an array to an object; it is **not** a hard cap on the total number of elements parsed. With the default `throwOnLimitExceeded: false`, exceeding `arrayLimit` never rejects or truncates input; it only changes the container type, and the resulting object still holds every element (so its size stays proportional to the input). This conversion is itself a safeguard: it avoids allocating a huge sparse array for input like `a[999999999]`. If you need a hard limit that rejects oversized arrays in untrusted query strings, set `throwOnLimitExceeded: true`. `throwOnLimitExceeded` still limits each array separately, not the total: with `comma: true`, each comma-separated group under `a[]=` counts as one element of the outer array, and can itself hold up to `arrayLimit` elements.
|
|
321
340
|
|
|
322
341
|
To prevent array syntax (`a[]`, `a[0]`) from being parsed as arrays, set `parseArrays` to `false`.
|
|
323
342
|
Note that duplicate keys (e.g. `a=b&a=c`) may still produce arrays when `duplicates` is `'combine'` (the default).
|
|
@@ -361,6 +380,15 @@ assert.deepEqual(arraysOfObjects, { a: ['b', 'c'] })
|
|
|
361
380
|
```
|
|
362
381
|
(_this cannot convert nested objects, such as `a={b:1},{c:d}`_)
|
|
363
382
|
|
|
383
|
+
With `[]` or index notation, the values from each comma-separated group stay together as one element of the array, while repeated plain keys flatten into one array:
|
|
384
|
+
```javascript
|
|
385
|
+
var nestedGroups = qs.parse('a[]=b,c&a[]=d', { comma: true });
|
|
386
|
+
assert.deepEqual(nestedGroups, { a: [['b', 'c'], 'd'] });
|
|
387
|
+
|
|
388
|
+
var flatGroups = qs.parse('a=b,c&a=d', { comma: true });
|
|
389
|
+
assert.deepEqual(flatGroups, { a: ['b', 'c', 'd'] });
|
|
390
|
+
```
|
|
391
|
+
|
|
364
392
|
### Parsing primitive/scalar values (numbers, booleans, null, etc)
|
|
365
393
|
|
|
366
394
|
By default, all values are parsed as strings.
|