Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed May 31, 2016
1 parent cc25a04 commit 999546d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 2 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ unreleased
- IPv4 netmasks must be contingous
- IPv6 addresses cannot be used as a netmask
- deps: [email protected]
* deps: [email protected]
- Add `decoder` option in `parse` function
* deps: type-is@~1.6.13
- Fix type error when given invalid type to match against
- deps: mime-types@~2.1.11
Expand Down
11 changes: 3 additions & 8 deletions lib/middleware/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,9 @@ module.exports = function query(options) {
opts = undefined;
}

if (opts !== undefined) {
if (opts.allowDots === undefined) {
opts.allowDots = false;
}

if (opts.allowPrototypes === undefined) {
opts.allowPrototypes = true;
}
if (opts !== undefined && opts.allowPrototypes === undefined) {
// back-compat for qs module
opts.allowPrototypes = true;
}

return function query(req, res, next){
Expand Down
1 change: 0 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ exports.setCharset = function setCharset(type, charset) {

function parseExtendedQueryString(str) {
return qs.parse(str, {
allowDots: false,
allowPrototypes: true
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"parseurl": "~1.3.1",
"path-to-regexp": "0.1.7",
"proxy-addr": "~1.1.2",
"qs": "4.0.0",
"qs": "6.2.0",
"range-parser": "~1.0.3",
"send": "0.13.1",
"serve-static": "~1.10.2",
Expand Down

0 comments on commit 999546d

Please sign in to comment.