
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.
Lightweight HTTP/HTTPS router with virtual hosts. Sets an accurate Allow
header based on routes. Routes can use parameter syntax, i.e. /users/:id
, or RegExp
syntax. Route parameters are not sanitized. If 2+ routes with parameters match a request the first route will be used to extract parameters.
"use strict";
const http = require("http"),
router = require("woodland")({defaultHeaders: {"Cache-Control": "no-cache"}});
router.use("/", (req, res) => {
res.writeHead(200, {"Content-Type": "text/plain"});
res.end("Hello World!");
});
router.use("/:user", (req, res) => {
res.writeHead(200, {"Content-Type": "text/plain"});
res.end("Hello " + req.params.user + "!");
});
http.createServer(router.route).listen(8000);
Executes if the connection was terminated before res.end()
was called or able to flush.
Executes if the request cannot be routed, default handler sends a basic text response.
Executes after the response has been sent.
Returns a woodland router.
Calls routes()
and returns a Boolean
to indicate if method
is allowed for uri
.
Returns a String
for the Allow
header. Caches value, & will update cache if override
is true
.
Blacklists fn
for calculating the return of allows()
.
Decorates allow
, body
, ip
, params
, parsed
, query
, & host
on req
and header()
& locals{}
on res
.
Returns a murmur3hash of arg
.
Determines the host
for arg
.
Function for http.createServer()
or https.createServer()
.
Returns an Array
of middleware for the request. Caches value, & will update cache if override
is true
.
Registers a virtual host with the woodland.
Registers middleware for a route. path
is a regular expression, and if not passed it defaults to /.*
. method
can be all
if you want the middleware to be used for all HTTP methods.
Copyright (c) 2017 Jason Mulligan Licensed under the BSD-3 license.
FAQs
Lightweight HTTP framework with automatic headers
The npm package woodland receives a total of 19 weekly downloads. As such, woodland popularity was classified as not popular.
We found that woodland demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.