Repository navigation
Comparing changes
Open a pull request
base repository: ljharb/qs
base: v6.15.1
head repository: ljharb/qs
compare: v6.15.3
- 19 commits
- 11 files changed
- 7 contributors
Commits on Nov 4, 2025
-
Configuration menu - View commit details
-
Copy full SHA for a419ce5 - Browse repository at this point
Copy the full SHA a419ce5View commit details
Commits on Mar 13, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 96755ab - Browse repository at this point
Copy the full SHA 96755abView commit details
Commits on Apr 24, 2026
-
[Fix]
stringify: applyformatterto encoded key under `strictNull……Handling` Previously the null branch returned the raw `encoder(prefix, ...)` output (or raw `prefix`) without running it through `formatter`. With `format: 'RFC1738'` this caused keys containing spaces to serialize as `%20` in strict-null mode while the normal primitive path produced `+`, yielding inconsistent output for the same key. Co-Authored-By: Claude <[email protected]> Co-Authored-By: DeepView Autofix <[email protected]> Co-Authored-By: Nikita Skovoroda <[email protected]> Co-Authored-By: Jordan Harband <[email protected]> Signed-off-by: Nikita Skovoroda <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e3062f7 - Browse repository at this point
Copy the full SHA e3062f7View commit details -
[Fix]
stringify: use configureddelimiteraftercharsetSentinelThe `utf8=...` charset sentinel was followed by a hardcoded `&`, ignoring `options.delimiter`. With any non-`&` delimiter the output mixed delimiters (e.g. `utf8=%E2%9C%93&a=1;b=2`), breaking self round-tripping. Emit the configured delimiter instead, and add a regression test. Co-Authored-By: Claude <[email protected]> Co-Authored-By: DeepView Autofix <[email protected]> Co-Authored-By: Nikita Skovoroda <[email protected]> Signed-off-by: Nikita Skovoroda <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a0a81ea - Browse repository at this point
Copy the full SHA a0a81eaView commit details
Commits on Apr 27, 2026
-
[Tests] add regression tests for keys containing percent-encoded brac…
…ket text Locks in the round-trip and direct-parse behavior for keys containing literal %5B, %5D, %255B, and %255D text.
Configuration menu - View commit details
-
Copy full SHA for 3a8b94a - Browse repository at this point
Copy the full SHA 3a8b94aView commit details -
[Fix]
stringify: skip null/undefined filter-array entries instead o……f crashing in `encoder` When `filter` is an array, its elements become `objKeys` directly and the top-level loop passes each entry as the recursive `prefix` argument without coercion. A `null` or `undefined` entry reached `utils.encode` as the `str` argument and `str.length` threw `TypeError`. The crash requires two conditions to align: the filter array must contain `null`/`undefined`, and the object being stringified must have a literal `'null'`/`'undefined'` property (otherwise `obj[key]` is `undefined` and the typeof-undefined early-return at stringify.js:137 fires before the encoder is called) Both are reachable from an attacker controlled input in applications that stringify user-submitted JSON with user-selected fields. Fix this up by skipping `null`/`undefined` filter entries at the top-level loop. This somewhat matches `JSON.stringify` replacer-array semantics, which silently ignore non-string/non-number entries. `Object.keys` never yields `null`/`undefined`, so the guard only affects user-supplied filter arrays. The inner recursive loop already coerces `key` via `String()` when building `keyPrefix`, so it never passes a raw `null` to the encoder.
Configuration menu - View commit details
-
Copy full SHA for 0c180a4 - Browse repository at this point
Copy the full SHA 0c180a4View commit details
Commits on May 16, 2026
-
[Fix]
stringify: skip null/undefined entries in `arrayFormat: 'comm……a'` + `encodeValuesOnly` instead of crashing in `encoder` When `arrayFormat: 'comma'` and `encodeValuesOnly: true` were both set, the comma branch passed array entries directly to the encoder via `utils.maybeMap` before the per-element null handling in the main loop. A `null` or `undefined` entry reached `utils.encode` as the `str` argument and `str.length` threw `TypeError`. Neither `skipNulls` nor `strictNullHandling` prevented the crash — both are checked downstream of the encode call on line 145, inside the per-`objKeys` loop, but the comma path collapses the entire array into a single `objKeys` entry before the loop runs. The fix wraps the encoder in a closure that passes `null`/`undefined` through unchanged, so they reach the `join(',')` step as-is. This matches the non-`encodeValuesOnly` comma path, which already joins before encoding and produces `a=%2Cb` for `{ a: [null, 'b'] }`; under `encodeValuesOnly` the comma stays unencoded as a separator, yielding `a=,b`. Single-null arrays still collapse to `null` via the existing `obj.join(',') || null` and remain subject to `skipNulls` / `strictNullHandling` in the main loop. Same class of issue as the filter-array path fixed in 0c180a4, introduced in 04eac8d (2021-04-19) when the comma + `encodeValuesOnly` branch was first added.Configuration menu - View commit details
-
Copy full SHA for 21f80b3 - Browse repository at this point
Copy the full SHA 21f80b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e33d33 - Browse repository at this point
Copy the full SHA 5e33d33View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9aca407 - Browse repository at this point
Copy the full SHA 9aca407View commit details
Commits on May 21, 2026
-
[Robustness]
utils.merge/utils.assign: avoid invoking `__proto_……_` setter when copying own properties When object-valued input to `parse` contains a nested object whose own keys include `__proto__` (e.g. from `JSON.parse('{"__proto__":...}')`, which creates an own data property via CreateDataProperty), the `acc[key] = value` assignment in `merge`/`assign` invoked the `Object.prototype.__proto__` accessor and mutated the per-call returned sub-object's [[Prototype]]. This is not `Object.prototype` pollution - it affects only the returned sub-object, and downstream consumers can guard with `hasOwnProperty` or `plainObjects: true` - but the setter firing as a side effect of property copying is a footgun that the string-input path has long guarded against (see `parseObject`'s `decodedRoot !== '__proto__'` check). Use `Object.defineProperty` for `__proto__` keys so an own data property is created instead.Configuration menu - View commit details
-
Copy full SHA for 9532969 - Browse repository at this point
Copy the full SHA 9532969View commit details
Commits on Jun 7, 2026
-
[Fix]
utils: respect encoding of surrogate pairs across chunksCo-authored-by: QingXuan <[email protected]> Co-authored-by: Jordan Harband <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 59da434 - Browse repository at this point
Copy the full SHA 59da434View commit details
Commits on Jun 23, 2026
-
[Fix]
parse: enforcethrowOnLimitExceededfor cumulative array gr……owth via `combine`/`merge` `throwOnLimitExceeded` was only honored on the per-part paths in `parse`. When an array grew past `arrayLimit` through duplicate-key combination (`utils.combine`) or through `utils.merge`'s overflow branches, the value was silently converted to an overflow object instead of throwing. Thread `throwOnLimitExceeded` into `utils.combine` and guard the overflow branches in `utils.merge`, so the option throws consistently wherever an array would otherwise be converted to an overflow object. This also covers the `arrayLimit: 1` scalar-to-array boundary for plain duplicate keys, bracket arrays, and mixed index/key notation.
Configuration menu - View commit details
-
Copy full SHA for 963e538 - Browse repository at this point
Copy the full SHA 963e538View commit details -
[Robustness]
parse: throw thearrayLimiterror before splitting o……versized comma values With `comma` and `throwOnLimitExceeded`, a single large comma-separated value was fully split into an array before the `arrayLimit` check ran, so an oversized value allocated the whole array (and could exhaust memory) before the `RangeError` was thrown. Count commas up to the limit and throw before splitting, for flat (non-bracket) values. Bracket `[]=` comma groups are intentionally one nested element, so they are unaffected. The post-split comma throw is now redundant (`utils.combine` already throws when `throwOnLimitExceeded` is set) and is removed.
Configuration menu - View commit details
-
Copy full SHA for 52afe00 - Browse repository at this point
Copy the full SHA 52afe00View commit details -
[Perf]
utils: makecompactO(n) via a side-channel visited-set in……stead of `Array.indexOf` `compact` tracked visited sub-objects in a plain array and tested membership with `refs.indexOf(val)` (O(n) per lookup), so the final graph walk was O(V^2) in the number of distinct sub-objects. Replace the array with a `side-channel` (already a dependency, already used in this file for `overflowChannel`) for O(1) membership, making the walk O(V). Membership semantics are identical, so circular-reference dedup is unchanged. `side-channel` is WeakMap-backed on modern engines and degrades gracefully on old ones, so this keeps `engines.node >= 0.6` (unlike a native `Set`/`WeakMap`).
Configuration menu - View commit details
-
Copy full SHA for 5d5f723 - Browse repository at this point
Copy the full SHA 5d5f723View commit details -
[Tests]
parse: characterize current lenient handling of unbalanced ……bracket keys (#558) Pin the current (lenient) parse output for every malformed/unbalanced bracket-key shape, so any future change to that behavior (e.g. the proposed "throw on unbalanced brackets" in #560) is explicit in the test diff rather than silent. Each case asserts both that parsing does not throw and the exact output, via a small `characterizeParse` helper, so a change that introduces a throw fails cleanly per case instead of aborting the run. Covers the cases #560 would make throw (`a[bc`, `a[`, `a[b][c`, `a[b]c[d`, the issue reproduction, stray-close variants), the ones it would leave as literals (inner-bracket and bracket-prefixed keys), the depth- and allowDots-dependent shapes, and the unaffected stray-close/trailing-text keys.
Configuration menu - View commit details
-
Copy full SHA for f4938f5 - Browse repository at this point
Copy the full SHA f4938f5View commit details
Commits on Jun 24, 2026
-
[Robustness]
utils: enforcearrayLimitconsistently across `merge……`'s array paths `utils.merge` had two paths that grew an array past `arrayLimit` without the conversion/throw that `utils.combine` already performs: - the primitive-into-array branch was off by one (it tested the pre-append length with `> arrayLimit`, allowing `arrayLimit + 1` elements through) - the array-into-array branch did not consult `arrayLimit` at all Both now convert to an overflow object, or throw under `throwOnLimitExceeded`, once the resulting length exceeds `arrayLimit`, matching `combine` and the indexed and duplicate-bracket paths. So `a[0]=x&a[]=y` no longer stays a 2-element array at `arrayLimit: 1`.
Configuration menu - View commit details
-
Copy full SHA for 74a0f6a - Browse repository at this point
Copy the full SHA 74a0f6aView commit details -
Configuration menu - View commit details
-
Copy full SHA for adce539 - Browse repository at this point
Copy the full SHA adce539View commit details -
Configuration menu - View commit details
-
Copy full SHA for c38af42 - Browse repository at this point
Copy the full SHA c38af42View commit details -
Configuration menu - View commit details
-
Copy full SHA for 18d085e - Browse repository at this point
Copy the full SHA 18d085eView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v6.15.1...v6.15.3