Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xss-req-sanitizer

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xss-req-sanitizer - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

8

lib/xss-req-sanitizer.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc