fix: restore array parsing for req.query repeated keys (#7147) by SAY-5 · Pull Request #7181 · expressjs/express (original) (raw)

krzysdz

suggested changes Apr 15, 2026

@SAY-5

)

qs 6.14 enforces a default arrayLimit of 20, which caused the extended query parser to collapse query strings with more than 20 repeated values (e.g. ?ids=1&ids=2&...&ids=25) into an object instead of an array. This regressed in 4.22.0 (with the bump to qs@~6.14.1) and broke existing consumers relying on the pre-6.14 behavior.

Pass arrayLimit: Infinity to qs.parse in parseExtendedQueryString so repeated keys always produce arrays, matching the behavior of Express <= 4.21.x. Added a regression test in test/req.query.js that sends 25 repeated values and asserts they round-trip as an array.

@jonchurch

jonchurch

jonchurch

jonchurch

mergify Bot added a commit to robfrank/linklift that referenced this pull request

Jun 4, 2026

@mergify

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})