Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
perfect-express-sanitizer
Advanced tools
a complete package to control user input data to prevent Cross Site Scripting (XSS) ,Sql injection and no Sql injection attack
A complete package to control user input data to prevent Cross Site Scripting (XSS) ,Sql injection and no Sql injection attack.
it can control body, query and header of the requests and clear all dirty stuff that might effect on functionally of the application.
Install via NPM:
npm install perfect-express-sanitizer
control input base on your requirements.
const sanitizer = require("perfect-express-sanitizer");
app.use(sanitize.clean({
xss: true,
noSql: true,
sql: true,
level: 5
}));
use white list for some routes that you want to skip ignore
const whiteList = ['/users', '/users/list', '/users/search?age'];
app.use(sanitize.clean({
xss: true,
noSql: true,
sql: true,
noSqlLevel: 5,
sqlLevel: 1
}, whiteList));
you can use more option setting level from 1 to 5 for sql or nosql sanitizer. higher level suggested and it will check more keywords.
const sanitizer = require("perfect-express-sanitizer");
app.use(sanitize.clean({
xss: true,
noSql: true,
sql: true,
sqlLevel: 5,
noSqlLevel: 5
}));
const sanitize = require("perfect-express-sanitizer");
console.log(sanitize("<script>alert('test')</script>", { xss: true, noSql: true, sql: true, level: 5 }));
This project is licensed under the terms of the MIT license
FAQs
a complete package to control user input data to prevent Cross Site Scripting (XSS) ,Sql injection and no Sql injection attack
The npm package perfect-express-sanitizer receives a total of 2,040 weekly downloads. As such, perfect-express-sanitizer popularity was classified as popular.
We found that perfect-express-sanitizer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.