xss-req-sanitizer
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -14,6 +14,8 @@ const xss = require('xss'); | ||
const strBody = JSON.stringify(req.body); | ||
const sanitizedBody = getSanitizedData(strBody); | ||
if(req && req.body){ | ||
const strBody = JSON.stringify(req.body); | ||
const sanitizedBody = getSanitizedData(strBody); | ||
req.body = JSON.parse(sanitizedBody); | ||
req.body = JSON.parse(sanitizedBody); | ||
} | ||
@@ -20,0 +22,0 @@ next(); |
{ | ||
"name": "xss-req-sanitizer", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Middleware to sanitize http requests", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,0 +0,0 @@ # xss-req-sanitizer |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4436
32