
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.
koa-simple-body
Advanced tools
npm install koa-simple-body
Coherent and consistent body parsing implementation for Koa v2.
Supports multipart, url-encoded and JSON data by default. Check the index.js
for the specific MIME types.
Everything it doesn't understand is parsed as plain text.
const Koa = require("koa")
const bodyParser = require("bodyParser")
const app = new Koa()
app.use(bodyParser())
app.use(ctx => {
// Print fields
console.log(ctx.request.fields)
// Print files (formidable)
console.log(ctx.request.files)
})
That's it!
bodyParser({
useBuffer: true, // enables parsing text/* as a buffer
buffer: "50kb", // max buffer size
text: "50kb", // max text size
json: "100kb", // max json size
urlEncoded: "500kb", // max url-encoded size
multipart: {
// Formidable options object (some examples shown)
maxFieldsSize: 5 * 1024 * 1024, // 5mb
// Allow array of files with 'multiple' attribute
multiples: true
}
})
For more information on the Formidable.IncomingForm
options available, see the
felixge/node-formidable repository.
MIT - see LICENSE file.
FAQs
A clean body parser for Koa v2
The npm package koa-simple-body receives a total of 0 weekly downloads. As such, koa-simple-body popularity was classified as not popular.
We found that koa-simple-body 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.