J
J
Joseph Kopeikin2018-05-20 13:33:08
Node.js
Joseph Kopeikin, 2018-05-20 13:33:08

How to sanitize expressjs incoming parameters?

If you send a POST request with escaped characters, the application crashes with an Unexpected token ' in JSON at position error.
This happens here
app.use(express.json());
How to process incoming data before express tries to parse to json ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question