A
A
Alexey2018-12-07 16:38:23
JavaScript
Alexey, 2018-12-07 16:38:23

Forbidden characters for JSON stringify?

I want to get rid of the regular expression for checking the username and check only the length through .length (with trim), but saving the profile and sending the name itself goes through the socket pre-stringed. The question is, is there a need to pre-check this string for specific characters that might spit out an error when using JSON.stringify ?
Well, maybe you know what other pitfalls there are with this method, except for xss and sql injections. The "appearance" of the username does not matter, even if there is an emoji, if only it is not empty.

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