
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
poom-bodyparser
Advanced tools
A plugin helps parse request body for poom
npm i poom-bodyparser -S
import { GET, POST, PUT, DELETE, HEAD } from 'poom-route';
import { BODYPARSER } from 'poom-bodyparser';
export default class ChartController {
@PUT('/chart/:id')
@BODYPARSER([{
autoCreate?: true, //[Boolean] Auto create folder if not existed
mimes: string, //Can inject data by string or fix string mime type. "() => `${state.config.ext}`" or 'jpg|png|.*'
limits: {
fileSize: number|string//Can inject data by string or fix string mime type. "() => state.config.maxSize" or 1024 (1MB)
},
returnType?: String; // [String] return only path, [Object] return full object file
returnPath?: string; // Return path after uploaded. Can inject "() => `upload/${state.auth.projectId}`" or "images/"
name: 'images'; // Field name
uploadDir?: string // absolute path where file will be saved to. Can inject "() => `assets/upload/${state.auth.projectId}`" or 'assets/images'
maxCount?: number|string // Max file can be uploaded. can inject "() => state.config.maxFile" or 3(max number of files upload)
resize?: [ // Auto resize image base on your configuration here
{w: -1000 }, // Auto resize origin when width > 1000. If width < 1000 do nothing
{w: 32, h: 32, ext: 'thumb'},
{w: 224, h: 200, ext: 'list.pc'},
{w: 358, h: 200, ext: 'list.tab'},
{w: 270, h: 200, ext: 'list.mob'}
] // Can inject "() => state.config.resize"
}])
static async add({
body, params
}) {
body.id = params.id; // Assign body data to params which is got from client
return body; // Return request body which is got from client
}
}
FAQs
Module help parser request body for poom
We found that poom-bodyparser 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.