express-mongo-sanitize
Advanced tools
Changelog
[2.2.0] - 2022-01-14
config
option:
allowDots
boolean: if set, allows dots in the user-supplied data #41dryRun
option #88Changelog
[2.1.0] - 2021-05-11
config
options:
onSanitize
callback: this will be called after the request's value was sanitized, with two named parameters: the key
that was sanitized, and the raw req
object.dryRun
boolean: if set, sanitization will not take place. Useful when combined with onSanitize
to report on the keys which would have been sanitized.Changelog
[2.0.2] - 2021-01-07
Changelog
[2.0.1] - 2020-12-02
Changelog
[2.0.0] - 2020-03-25
Note that if you weren't previously expecting headers to be sanitized, this is considered a breaking change.
Changelog
[1.3.2] - 2017-01-12
Changelog
[1.3.1] - 2017-01-12
Changelog
[1.3.0] - 2016-01-15
has
, which checks whether a passed object/array contains any keys with prohibited characters.Changelog
[1.2.0] - 2016-01-13
replaceWith
which can be used to replace offending characters in a key. This is an alternative to removing the data from the payload.