Hello all,In my express application I was using "express-sanitizer" which was fine until I have made API stuff with objects. This library apparently always returns a string so when I do:bodyRequest.objectField = sanitize(bodyRequest.objectField)The objectField becomes a string which is wrong because I want it to stay as an object. I would have thought that library would go field by field within the object and sanitize the fields individually but it does not look like it is the case.Therefore, do you have any favourite sanitizer for express/node? The idea is just to sanitize so everything that could contain is trimmed.I have already a validator(AJV).Thank you in advance and regards.
Submitted April 19, 2020 at 10:31AM by dejavits
No comments:
Post a Comment