Releases: edwardsmit/node-qs-serialization
Releases · edwardsmit/node-qs-serialization
v1.1.0 — compat shim release
First compat shim release. deparam now delegates parsing to qs (currently 6.15.2) while param keeps the original jQuery-traditional stringify implementation. All 58 conformance cases stay green; the only API change since 1.0.0 is none — the optional maxDepth parameter was already there.
What changed
lib/deparam.jsrewritten as aqs.parsewrapper with three local protections layered on top:safeDecoder: ISO-8859 fallback viaunescape()whendecodeURIComponentrejects malformed UTF-8. Preserves accents from legacy Latin-1 query strings (e.g. on the way to Elasticsearch).preFilter: per-parameter rejection of__proto__/constructor/prototypekey segments and of paths exceedingmaxDepth(default 5).coerceWalk: post-parse type coercion (true/false/null/undefinedstrings, numerics) — opt-out viadeparam(qs, false).
lib/param.jsunchanged from 1.0.0 — pure ES5, zero deps, no attack surface.
Dependency change
qs^6.15.2added as a runtime dependency (was zero deps in 1.0.0).- Future qs CVE patches flow in automatically via Dependabot lockfile bumps in downstream projects — no republish of this library needed for routine patches.
CI changes
- New job: Conformance against
qs@latest— installs bleeding-edge qs unsaved and reruns the conformance suite. Early-warning for any future qs release that would break the shim.
Install
npm install node-qs-serialization@1.1.0
Verified
- All 58 conformance cases green on Node 18/20/22/24
- Smoke test green on Node 0.10 through 16 via Docker
- Full saas-sitesearch integration suite (757 mocha tests, 90% coverage gates) green with 1.1.0 swapped in as a transparent drop-in for 0.0.2
v1.0.0 — Phase 0 baseline
First maintained release since 2014. Today's code with the minimum patches to be CVE-clean on the original install target (Node 0.10+).
Security
- Reject
deparamparameter keys equal to__proto__,constructor, orprototype(same shape as qs CVE-2017-1000048 / CVE-2022-24999). - New
maxDepthparameter ondeparam(default5) caps nesting depth; parameters exceeding it are silently dropped.
Tooling
- Consolidated
LICENSEwith full attribution to jQuery and jquery-bbq. - Added
SECURITY.md,filesallowlist,engines: ">=0.10". - CI matrix: full mocha on Node 18/20/22/24 via setup-node, Docker smoke on Node 0.10/0.12/4/6/8/10/12/14/16. Zero runtime CVEs.
Tests
- Reference Conformance Spec (`test/conformance.spec.js`, 58 cases) pins the wire-format and security contract for all future modernization phases and any replacement library.
Install
```
npm install node-qs-serialization@1.0.0
```
Breaking change: callers passing prototype-polluting keys or relying on >5-deep nested parameters via `deparam` will see those values silently dropped. Both behaviors are pinned by the conformance spec.