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

@hapi/content

Package Overview
Dependencies
Maintainers
6
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapi/content - npm Package Compare versions

Comparing version 5.0.2 to 6.0.0

18

lib/index.js

@@ -21,6 +21,9 @@ 'use strict';

// 1: "b" 2: b
internals.paramsRegex = /;\s*boundary=(?:"([^"]+)"|([^;"\s]+))/i;
// 1: "b" 2: b
internals.charsetParamRegex = /;\s*charset=(?:"([^"]+)"|([^;"\s]+))/i;
// 1: "b" 2: b
internals.boundaryParamRegex = /;\s*boundary=(?:"([^"]+)"|([^;"\s]+))/i;
exports.type = function (header) {

@@ -41,6 +44,13 @@

const params = match[2];
if (params) {
const param = params.match(internals.charsetParamRegex);
if (param) {
result.charset = (param[1] || param[2]).toLowerCase();
}
}
if (result.mime.indexOf('multipart/') === 0) {
const params = match[2];
if (params) {
const param = params.match(internals.paramsRegex);
const param = params.match(internals.boundaryParamRegex);
if (param) {

@@ -47,0 +57,0 @@ result.boundary = param[1] || param[2];

@@ -1,3 +0,4 @@

Copyright (c) 2014-2020, Sideway Inc, and project contributors
Copyright (c) 2014, Walmart.
Copyright (c) 2014-2022, Project contributors
Copyright (c) 2014-2020, Sideway Inc
Copyright (c) 2014, Walmart.
All rights reserved.

@@ -4,0 +5,0 @@

{
"name": "@hapi/content",
"description": "HTTP Content-* headers parsing",
"version": "5.0.2",
"version": "6.0.0",
"repository": "git://github.com/hapijs/content",

@@ -17,8 +17,14 @@ "main": "lib/index.js",

],
"eslintConfig": {
"extends": [
"plugin:@hapi/module"
]
},
"dependencies": {
"@hapi/boom": "9.x.x"
"@hapi/boom": "^10.0.0"
},
"devDependencies": {
"@hapi/code": "8.x.x",
"@hapi/lab": "22.x.x"
"@hapi/code": "^9.0.0",
"@hapi/eslint-plugin": "*",
"@hapi/lab": "^25.0.1"
},

@@ -25,0 +31,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