
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
A simple request handler (controller/middleware) chainer
$ npm i chaindler
const { Chain } = require('chaindler');
function mw1 (req, res, next) {
console.log('1');
next();
}
function mw2 (req, res, next) {
console.log('2');
next();
}
function mw3 (req, res, next) {
console.log('3');
next();
}
function controller (req, res, next) {
res.send('hello');
}
import express = require('express');
const app = express();
app.use('/hello', new Chain(mw1, mw2, mw3).handle(controller));
NOTE: Example was with the assumption you are using express.js
This module was developed with Node.js servers that uses swagger-node
, express-openapi
, and other kinds of modules that limits your ability to chain middlewares in mind.
These kinds of modules would require you to have your controllers in an object, and to use chaindler
in that scenario would be something like this:
const controllers = {
operation1: new Chain(mw1, mw2, mw3).handle(controller),
operation2: new Chain(mw1, mw2, mw3).handle(controller),
}
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A simple request handler (controller/middleware) chainer
The npm package chaindler receives a total of 1 weekly downloads. As such, chaindler popularity was classified as not popular.
We found that chaindler 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
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.