You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can change the behavior with that above query parser setting. You likely want the simple parser rather than the extended parser. The main difference is that extended uses the qs module and simple uses the Node.js querystring module (both linked from our docs).
Hi! I recently encountered an interesting case of how query string shows up in
req.query
in my logs.Normal call:
https://some-api.com/?tags=tag1,tag2,tag3
Weird/potentially dangerous:
https://some-api.com/?tags=tag1,tag2,tag3&tags[i]=tag4
<- notice thistags[i]=<value>
Here's how the req.query looks like:
I would expect
tags
to be a string just like in normal call.It shouldn't suddenly turn to an array with strings and an object at the end.
The text was updated successfully, but these errors were encountered: