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

formidable

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formidable - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

lib/.multipart_parser.js.un~

6

lib/incoming_form.js

@@ -297,4 +297,4 @@ if (global.GENTLY) require = GENTLY.hijack(require);

var filename = self._fileName(headerValue);
if (filename) {
part.filename = filename;
if (filename !== undefined) {
part.filename = filename || part.name;
}

@@ -330,3 +330,3 @@ } else if (headerField == 'content-type') {

IncomingForm.prototype._fileName = function(headerValue) {
var m = headerValue.match(/filename="(.+?)"($|; )/i)
var m = headerValue.match(/filename="(.*?)"($|; )/i)
if (!m) return;

@@ -333,0 +333,0 @@

@@ -52,2 +52,9 @@ var Buffer = require('buffer').Buffer,

MultipartParser.stateToString = function(stateNumber) {
for (var state in S) {
var number = S[state];
if (number === stateNumber) return state;
}
};
MultipartParser.prototype.initWithBoundary = function(str) {

@@ -300,4 +307,8 @@ this.boundary = new Buffer(str.length+4);

if (this.state != S.END) {
return new Error('MultipartParser.end(): stream ended unexpectedly');
return new Error('MultipartParser.end(): stream ended unexpectedly: ' + this.explain());
}
};
MultipartParser.prototype.explain = function() {
return 'state = ' + MultipartParser.stateToString(this.state);
};
{
"name": "formidable",
"version": "1.0.4",
"version": "1.0.5",
"dependencies": {},

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

@@ -23,2 +23,11 @@ # Formidable

### v1.0.5
* Support filename="" in multipart parts
* Explain unexpected end() errors in parser better
### v1.0.4
* Detect a good default tmp directory regardless of plattform. (#88)
### v1.0.3

@@ -25,0 +34,0 @@

@@ -43,3 +43,3 @@ var common = require('../common');

(function testError() {
assert.equal(parser.end().message, 'MultipartParser.end(): stream ended unexpectedly');
assert.equal(parser.end().message, 'MultipartParser.end(): stream ended unexpectedly: ' + parser.explain());
})();

@@ -46,0 +46,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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