Skip to content

v5: how to sanitize req.query? #6490

Answered by thom-nic
thom-nic asked this question in Q&A
Discussion options

You must be logged in to vote

Update: This gist provides a couple options express5_mutable_query.js

Thanks to a helpful answer on SO I have a solution that only mutates req.query when the validation middleware needs to change it. I updated the gist linked above.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by thom-nic
Comment options

You must be logged in to vote
3 replies
@thom-nic
Comment options

@krzysdz
Comment options

@thom-nic
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants