Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@middy/http-multipart-body-parser

Package Overview
Dependencies
Maintainers
3
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@middy/http-multipart-body-parser - npm Package Compare versions

Comparing version 4.6.1 to 4.6.2

6

index.js

@@ -6,2 +6,3 @@ import BusBoy from 'busboy';

const defaults = {
// busboy options as per documentation: https://www.npmjs.com/package/busboy#busboy-methods
busboy: {},

@@ -18,3 +19,3 @@ charset: 'utf8',

const { headers } = request.event;
const contentType = headers['Content-Type'] ?? headers['content-type'];
const contentType = headers?.['Content-Type'] ?? headers?.['content-type'];
if (!mimePattern.test(contentType)) {

@@ -29,4 +30,6 @@ if (options.disableContentTypeError) {

return parseMultipartData(request.event, options).then((multipartData)=>{
// request.event.rawBody = body
request.event.body = multipartData;
}).catch((cause)=>{
// UnprocessableEntity
throw createError(415, 'Invalid or malformed multipart/form-data was provided', {

@@ -44,2 +47,3 @@ cause

const charset = event.isBase64Encoded ? 'base64' : options.charset;
// header must be lowercase (content-type)
const busboy = BusBoy({

@@ -46,0 +50,0 @@ ...options.busboy,

8

package.json
{
"name": "@middy/http-multipart-body-parser",
"version": "4.6.1",
"version": "4.6.2",
"description": "Http event normalizer middleware for the middy framework",

@@ -69,11 +69,11 @@ "type": "module",

"dependencies": {
"@middy/util": "4.6.1",
"@middy/util": "4.6.2",
"busboy": "1.6.0"
},
"devDependencies": {
"@middy/core": "4.6.1",
"@middy/core": "4.6.2",
"@types/aws-lambda": "^8.10.101",
"type-fest": "^4.0.0"
},
"gitHead": "253ed0e4ca95623decbade03938a07d837a1eba2"
"gitHead": "8b03a01abf5a9c08231ec5ced775e87f8be8f67d"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc