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

multiparty

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multiparty - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

### 3.2.2
* fix error on empty payloads (thanks [dougwilson])
### 3.2.1

@@ -2,0 +6,0 @@

34

index.js

@@ -23,3 +23,4 @@ exports.Form = Form;

, PART_END = 10
, END = 11
, CLOSE_BOUNDARY = 11
, END = 12

@@ -184,3 +185,7 @@ , LF = 10

case START_BOUNDARY:
if (index === boundaryLength - 2) {
if (index === boundaryLength - 2 && c == HYPHEN) {
index = 1;
state = CLOSE_BOUNDARY;
break;
} else if (index === boundaryLength - 2) {
if (c !== CR) return self.handleError(new Error("Expected CR Received " + c));

@@ -290,4 +295,5 @@ index++;

} else if (c === HYPHEN) {
// HYPHEN = end boundary
self.lastBoundaryFlag = true;
index = 1;
state = CLOSE_BOUNDARY;
break;
} else {

@@ -306,10 +312,2 @@ index = 0;

}
} else if (self.lastBoundaryFlag) {
if (c === HYPHEN) {
self.onParsePartEnd();
self.end();
state = END;
} else {
index = 0;
}
} else {

@@ -337,2 +335,13 @@ index = 0;

break;
case CLOSE_BOUNDARY:
if (c !== HYPHEN) return self.handleError(new Error("Expected HYPHEN Received " + c));
if (index === 1) {
self.onParsePartEnd();
self.end();
state = END;
} else if (index > 1) {
return self.handleError(new Error("Parser has invalid state."));
}
index++;
break;
case END:

@@ -608,3 +617,2 @@ break;

self.partBoundaryFlag = false;
self.lastBoundaryFlag = false;

@@ -611,0 +619,0 @@ self.on('finish', function() {

{
"name": "multiparty",
"version": "3.2.1",
"version": "3.2.2",
"description": "multipart/form-data parser which supports streaming",

@@ -5,0 +5,0 @@ "repository": {

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