Skip to content

This express module detects sql injection attacks and stops them.

License

Notifications You must be signed in to change notification settings

vymarkov/sql-injection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

sql-injection

This express module detects sql injection attacks and stops them by sending 403 as response. The module checks the query string, route params, and body for any sql injection related content.

var app = express();
var sqlinjection = require('sql-injection');
app.use(sqlinjection);

Installation

$ npm install sql-injection

Usage

code example:

var express = require('express');
var sqlinjection = require('sql-injection');

var app = express();

app.configure(function() {
    app.use(sqlinjection);  // add sql-injection middleware here
});

app.get('/route1', function(req, res) {
    res.send(200, {});
});
app.get('/route2/:uid', function(req, res) {
    res.send(200, {});
});
app.post('/route3', function(req, res) {
    res.send(200, {});
});
app.listen(3000);

About

This express module detects sql injection attacks and stops them.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published