Comparing version 2.1.5 to 2.2.2
'use strict'; | ||
// Load modules | ||
const Stream = require('stream'); | ||
const Stream = require('stream'); | ||
const B64 = require('b64'); | ||
@@ -13,4 +12,2 @@ const Boom = require('boom'); | ||
// Declare internals | ||
const internals = {}; | ||
@@ -64,4 +61,3 @@ | ||
Hoek.assert(options !== null && typeof options === 'object', | ||
'options must be an object'); | ||
Hoek.assert(options !== null && typeof options === 'object', 'options must be an object'); | ||
const settings = Hoek.applyToDefaults(internals.defaults, options); | ||
@@ -81,4 +77,4 @@ | ||
this._parts = new Nigel.Stream(new Buffer('--' + settings.boundary)); | ||
this._lines = new Nigel.Stream(new Buffer('\r\n')); | ||
this._parts = new Nigel.Stream(Buffer.from('--' + settings.boundary)); | ||
this._lines = new Nigel.Stream(Buffer.from('\r\n')); | ||
@@ -228,3 +224,3 @@ this._parts.on('needle', () => { | ||
this._parts.needle(new Buffer('\r\n--' + this._boundary)); // CRLF no longer optional | ||
this._parts.needle(Buffer.from('\r\n--' + this._boundary)); // CRLF no longer optional | ||
} | ||
@@ -393,4 +389,9 @@ | ||
this._headers[this._pendingHeader.slice(0, sep).toLowerCase()] = this._pendingHeader.slice(sep + 1).trim(); | ||
const name = this._pendingHeader.slice(0, sep).toLowerCase(); | ||
if (name === '__proto__') { | ||
return this._abort(Boom.badRequest('Invalid header')); | ||
} | ||
this._headers[name] = this._pendingHeader.slice(sep + 1).trim(); | ||
this._pendingHeader = ''; | ||
}; |
{ | ||
"name": "pez", | ||
"description": "Multipart parser", | ||
"version": "2.1.5", | ||
"version": "2.2.2", | ||
"repository": "git://github.com/hapijs/pez", | ||
"engines": { | ||
"node": ">=6.0.0" | ||
}, | ||
"main": "lib/index.js", | ||
@@ -12,9 +15,6 @@ "keywords": [ | ||
], | ||
"engines": { | ||
"node": ">=4.0.0" | ||
}, | ||
"dependencies": { | ||
"b64": "3.x.x", | ||
"boom": "5.x.x", | ||
"content": "3.x.x", | ||
"content": "^3.1.1", | ||
"hoek": "4.x.x", | ||
@@ -26,10 +26,10 @@ "nigel": "2.x.x" | ||
"form-data": "2.x.x", | ||
"lab": "13.x.x", | ||
"lab": "14.x.x", | ||
"wreck": "12.x.x" | ||
}, | ||
"scripts": { | ||
"test": "lab -t 100 -v -L -a code", | ||
"test-cov-html": "lab -a code -r html -o coverage.html" | ||
"test": "lab -t 100 -L -a code -l", | ||
"test-cov-html": "lab -a code -r html -o coverage.html -l" | ||
}, | ||
"license": "BSD-3-Clause" | ||
"license": "SEE LICENSE IN LICENSE.md" | ||
} |
@@ -1,9 +0,5 @@ | ||
#pez | ||
# pez | ||
[![Current Version](https://img.shields.io/npm/v/pez.svg)](https://www.npmjs.org/package/pez) | ||
[![Build Status via Travis CI](https://travis-ci.org/hapijs/pez.svg?branch=master)](https://travis-ci.org/hapijs/pez) | ||
![Dependencies](http://img.shields.io/david/hapijs/pez.svg) | ||
Multipart parser. | ||
Lead Maintainer - [Colin Ihrig](https://github.com/cjihrig) | ||
[![Build Status](https://travis-ci.org/hapijs/pez.svg?branch=v2-commercial)](https://travis-ci.org/hapijs/pez) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
276
11372
1
1
80
6
1
Updatedcontent@^3.1.1