Skip to content

Commit d91825b

Browse files
fixup: address review comments
1 parent 903b730 commit d91825b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

_includes/api/en/5x/req-query.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h3 id='req.query'>req.query</h3>
22

33
This property is an object containing a property for each query string parameter in the route.
4-
When disabled, the `req.query` will be an empty object (`{}`). Else, the result of configured query parser.
4+
When [`query parser`](#app.settings.table) is set to disabled, it is an empty object `{}`, otherwise it is the result of the configured query parser.
55

66
<div class="doc-box doc-warn" markdown="1">
77
As `req.query`'s shape is based on user-controlled input, all properties and values in this object are untrusted and should be validated before trusting. For example, `req.query.foo.toString()` may fail in multiple ways, for example `foo` may not be there or may not be a string, and `toString` may not be a function and instead a string or other user-input.
@@ -26,3 +26,5 @@ console.dir(req.query.shoe.type)
2626
console.dir(req.query.color)
2727
// => [blue, black, red]
2828
```
29+
30+
{% include api/en/5x/app-settings.md %}

en/guide/migrating-5.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ In Express 4, the `req.host` function incorrectly stripped off the port number i
124124

125125
In Express 4.7 and Express 5 onwards, the query parser option can accept `false` to disable query string parsing when you want to use your own function for query string parsing logic.
126126

127-
When disabled, the `req.query` will be an empty object (`{}`). Else, the result of configured query parser.
128-
129127
<h3>Improvements</h3>
130128

131129
<h4 id="res.render">res.render()</h4>

0 commit comments

Comments
 (0)