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
I stumbled upon this from a bad input name in my EJS. It seems that querystring isn't expecting un-scoped properties. I don't know what should happen in this case, but the error should probably be handled somehow?
require("qs").parse("[foo]=bar")
TypeError: Cannot read property 'undefined' of undefined
at parse (/node_modules/qs/lib/querystring.js:50:37)
at /node_modules/qs/lib/querystring.js:73:9
at Array.reduce (native)
at Object.parse (/node_modules/qs/lib/querystring.js:27:6)
at [object Context]:1:15
at Interface.<anonymous> (repl.js:171:22)
at Interface.emit (events.js:64:17)
at Interface._onLine (readline.js:153:10)
at Interface._line (readline.js:408:8)
at Interface._ttyWrite (readline.js:585:14)
The text was updated successfully, but these errors were encountered:
I don't think it matters too much though, as I doubt anyone is going to intentionally do this. I vote for consistency and just bind the foo property directly to the req.body with the bar value. If this behavior is unexpected, they will quickly see whats going on when they inspect the request anyway.
I stumbled upon this from a bad input name in my EJS. It seems that querystring isn't expecting un-scoped properties. I don't know what should happen in this case, but the error should probably be handled somehow?
The text was updated successfully, but these errors were encountered: