
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
express-qs-parser
Advanced tools
Query string parser middleware for express. Easily apply regular expressions on query string parameters.
###Installation npm install --save express-qs-parser
###Configuration
Type: Object
: { string: RegExp }
Default value: {}
list of parameters to be analyzed
Type: String
Default value: "parsedQuery"
name of the request property where the middleware will store the parsed parameters
###Example
// http://localhost:1337/?filters=fu>9,bar=test
// => parsedQuery: { filters: [['fu','>','9'],['bar','=','test']] }
// http://localhost:1337/?filters=fubar
// => parsedQuery: { filters: null }
// http://localhost:1337/?filters=fu>9,bar=test&order=-fu
// => parsedQuery: { filters: [['fu','>','9'],['bar','=','test']], order: ['-','fu'] }
var http = require('http'),
express = require('express'),
expressQSParser = require('express-qs-parser');
var app = express(),
server = http.Server(app),
qsParserMiddleware = expressQSParser({
// list of parameters to be analyzed
params: {
//applies the pattern on all matched elements thanks to the global option
filters: /([\w-_]+)(\>|<|\=|\!=)([\w_-]+)/g,
order: /(-?)([\w\s]+)/
},
// name of the request property where the middleware will store the parsed parameters
storage: 'parsedQuery'
});
//--------------------------------------------------------------------
// applies the parser on all routes
app.use(qsParserMiddleware);
var router = express.Router();
router.get('/', function(request, response) {
response.status(200).json(request.parsedQuery);
});
//--------------------------------------------------------------------
// router.get('/', qsParserMiddleware, function(request, response) {
// response.status(200).json(request.parsedQuery);
// });
//--------------------------------------------------------------------
app.use(router);
server.listen(1337, function() {
console.log('Server listening on %s:%d',this.address().address,this.address().port);
});
module.exports = { app: app, server: server };
FAQs
Query string parser middleware for express
The npm package express-qs-parser receives a total of 3 weekly downloads. As such, express-qs-parser popularity was classified as not popular.
We found that express-qs-parser demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.