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

express-xss-sanitizer

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-xss-sanitizer - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

11

lib/sanitize.js

@@ -5,6 +5,13 @@ "use strict";

function hasOwn(object, key) {
const keys = Reflect.ownKeys(object).filter(
(item) => typeof item !== "symbol"
);
return keys.includes(key);
}
const initializeOptions = (options) => {
const sanitizerOptions = {};
if (
Object.hasOwn(options, "allowedTags") &&
hasOwn(options, "allowedTags") &&
Array.isArray(options.allowedTags) &&

@@ -17,3 +24,3 @@ options.allowedTags.length > 0

allowedKeys:
(Object.hasOwn(options, "allowedKeys") &&
(hasOwn(options, "allowedKeys") &&
Array.isArray(options.allowedKeys) &&

@@ -20,0 +27,0 @@ options.allowedKeys) ||

2

package.json
{
"name": "express-xss-sanitizer",
"version": "1.1.4",
"version": "1.1.5",
"description": "Express 4.x middleware which sanitizes user input data (in req.body, req.query, req.headers and req.params) to prevent Cross Site Scripting (XSS) attack.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,4 +9,2 @@ # Express XSS Sanitizer

```
## Version Compatibility
* Express XSS Sanitizer v1.1.3 or above need node v16.9.0 or above
## Usage

@@ -13,0 +11,0 @@ Add as a piece of express middleware, before defining your routes.

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