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

express-validator

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-validator - npm Package Compare versions

Comparing version 2.8.0 to 2.9.0

LICENSE

23

lib/express_validator.js

@@ -176,3 +176,3 @@ /*

req.check = checkParam(req, function(item) {
return req.param(item);
return param(req, item);
});

@@ -225,4 +225,4 @@

req.filter = function(param) {
return sanitize(this, param, this.param(param));
req.filter = function(item) {
return sanitize(this, item, param(req, item));
};

@@ -235,2 +235,19 @@

// Taken from express 3.x for express 4.x compatibility
function param(req, name, defaultValue){
// route params like /user/:id
if (req.params && req.params.hasOwnProperty(name) && undefined !== req.params[name]) {
return req.params[name];
}
// query string params
if (undefined !== req.query[name]) {
return req.query[name];
}
// request body params via connect.bodyParser
if (req.body && undefined !== req.body[name]) {
return req.body[name];
}
return defaultValue;
}
return next();

@@ -237,0 +254,0 @@ };

4

package.json

@@ -11,3 +11,3 @@ {

],
"version": "2.8.0",
"version": "2.9.0",
"homepage": "https://github.com/ctavan/express-validator",

@@ -26,3 +26,3 @@ "repository": {

"dependencies": {
"validator": "3.26.0"
"validator": "3.34.0"
},

@@ -29,0 +29,0 @@ "devDependencies": {

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