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

perfect-express-sanitizer

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

perfect-express-sanitizer - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

10

data/sql.js

@@ -308,7 +308,2 @@ module.exports = [

{
regex: '1*56',
flag: 'ig',
level: 5
},
{
regex: 'ORDER BY',

@@ -629,7 +624,2 @@ flag: 'ig',

{
regex: 'admin',
flag: 'ig',
level: 5
},
{
regex: '"*"',

@@ -636,0 +626,0 @@ flag: 'ig',

6

modules/index.js

@@ -5,3 +5,7 @@ const nosql_injection = require('./nosql_injection');

const prepareSanitize = (data, options = { xss: true, sql: false, noSql: false, sqlLevel: 5, noSqlLevel: 5 }) => {
const prepareSanitize = (data, options = { xss: true, sql: false, noSql: false, sqlLevel: 5, noSqlLevel: 5, level }) => {
if (options.level){
options.sqlLevel = options.level;
options.noSqlLevel = options.level;
}
if (options.xss)

@@ -8,0 +12,0 @@ data = xss_sanitize.prepareSanitize(data, options)

{
"name": "perfect-express-sanitizer",
"version": "1.0.9",
"version": "1.0.10",
"description": "a complete package to control user input data to prevent Cross Site Scripting (XSS) ,Sql injection and no Sql injection attack",

@@ -64,2 +64,2 @@ "main": "index.js",

]
}
}

@@ -327,4 +327,11 @@

});
it("test static digit", function () {
const perfectExpressSanitizer = require("../index");
const cleanResult = perfectExpressSanitizer.sanitize.prepareSanitize("55-56-89-85", { xss: true, noSql: true, sql: true, level: 5 });
const dirtyResult = perfectExpressSanitizer.sanitize.prepareSanitize("55-56-89-85;'Drop'", { xss: true, noSql: true, sql: true, level: 5 });
expect(cleanResult).to.equal('55-56-89-85');
expect(dirtyResult).to.equal('55-56-89-85');
});
});
});
});
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