Socket
Socket
Sign inDemoInstall

@hapi/pez

Package Overview
Dependencies
Maintainers
7
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapi/pez - npm Package Compare versions

Comparing version 5.0.3 to 5.1.0

17

lib/index.js

@@ -52,3 +52,4 @@ 'use strict';

internals.defaults = {
maxBytes: Infinity
maxBytes: Infinity,
maxParts: Infinity
};

@@ -75,4 +76,6 @@

this._error = null;
this._bytes = 0;
this._bytesCount = 0;
this._partsCount = 0;
this._maxBytes = settings.maxBytes;
this._maxParts = settings.maxParts;

@@ -137,5 +140,5 @@ this._parts = new Nigel.Stream(Buffer.from('--' + settings.boundary));

this._bytes += Buffer.byteLength(data);
this._bytesCount += Buffer.byteLength(data);
if (this._bytes > this._maxBytes) {
if (this._bytesCount > this._maxBytes) {
finish(Boom.entityTooLarge('Maximum size exceeded'));

@@ -199,2 +202,8 @@ }

}
else {
this._partsCount++;
if (this._partsCount > this._maxParts) {
return this._abort(Boom.badRequest('Maximum parts exceeded'));
}
}

@@ -201,0 +210,0 @@ this._state = internals.state.boundary;

{
"name": "@hapi/pez",
"description": "Multipart parser",
"version": "5.0.3",
"version": "5.1.0",
"repository": "git://github.com/hapijs/pez",

@@ -15,2 +15,7 @@ "main": "lib/index.js",

],
"eslintConfig": {
"extends": [
"plugin:@hapi/module"
]
},
"dependencies": {

@@ -25,6 +30,7 @@ "@hapi/b64": "5.x.x",

"@hapi/code": "8.x.x",
"@hapi/lab": "22.x.x",
"@hapi/teamwork": "4.x.x",
"@hapi/eslint-plugin": "5.x.x",
"@hapi/lab": "24.x.x",
"@hapi/teamwork": "5.x.x",
"@hapi/wreck": "17.x.x",
"form-data": "3.x.x"
"form-data": "4.x.x"
},

@@ -31,0 +37,0 @@ "scripts": {

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