Visitar URL original
Comparing v6.15.0...v6.15.2 · ljharb/qs · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ljharb/qs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.15.0
Choose a base ref
...
head repository: ljharb/qs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.15.2
Choose a head ref
  • 14 commits
  • 10 files changed
  • 6 contributors

Commits on Nov 4, 2025

  1. Configuration menu
    Copy the full SHA
    a419ce5 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2026

  1. [readme] fix grammar

    JoBeGaming authored and ljharb committed Mar 13, 2026
    Configuration menu
    Copy the full SHA
    96755ab View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2026

  1. [Tests] increase coverage

    ljharb committed Mar 15, 2026
    Configuration menu
    Copy the full SHA
    b0cfe7c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dbb05d7 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2026

  1. Configuration menu
    Copy the full SHA
    4dfa0f0 View commit details
    Browse the repository at this point in the history
  2. [Fix] parse: parameterLimit: Infinity with `throwOnLimitExceeded:…

    … true` silently drops all parameters
    ljharb committed Apr 8, 2026
    Configuration menu
    Copy the full SHA
    c85b67f View commit details
    Browse the repository at this point in the history
  3. v6.15.1

    ljharb committed Apr 8, 2026
    Configuration menu
    Copy the full SHA
    3f5e1c5 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2026

  1. [Fix] stringify: apply formatter to 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 <noreply@anthropic.com>
    Co-Authored-By: DeepView Autofix <276251120+deepview-autofix@users.noreply.github.com>
    Co-Authored-By: Nikita Skovoroda <chalkerx@gmail.com>
    Co-Authored-By: Jordan Harband <ljharb@gmail.com>
    Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com>
    4 people committed Apr 24, 2026
    Configuration menu
    Copy the full SHA
    e3062f7 View commit details
    Browse the repository at this point in the history
  2. [Fix] stringify: use configured delimiter after charsetSentinel

    The `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 <noreply@anthropic.com>
    Co-Authored-By: DeepView Autofix <276251120+deepview-autofix@users.noreply.github.com>
    Co-Authored-By: Nikita Skovoroda <chalkerx@gmail.com>
    Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com>
    3 people authored and ljharb committed Apr 24, 2026
    Configuration menu
    Copy the full SHA
    a0a81ea View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2026

  1. [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.
    ljharb committed Apr 27, 2026
    Configuration menu
    Copy the full SHA
    3a8b94a View commit details
    Browse the repository at this point in the history
  2. [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.
    ljharb committed Apr 27, 2026
    Configuration menu
    Copy the full SHA
    0c180a4 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2026

  1. [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.
    ljharb committed May 16, 2026
    Configuration menu
    Copy the full SHA
    21f80b3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e33d33 View commit details
    Browse the repository at this point in the history
  3. v6.15.2

    ljharb committed May 16, 2026
    Configuration menu
    Copy the full SHA
    9aca407 View commit details
    Browse the repository at this point in the history
Loading