New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mailsplit

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailsplit - npm Package Compare versions

Comparing version 5.2.0 to 5.3.0

18

lib/mime-node.js

@@ -8,2 +8,3 @@ 'use strict';

const PassThrough = require('stream').PassThrough;
const pathlib = require('path');

@@ -66,2 +67,4 @@ class MimeNode {

this._parsedContentDisposition = this.libmime.parseHeaderValue(this.headers.getFirst('Content-Disposition'));
// if content-type is missing default to plaintext

@@ -72,3 +75,14 @@ let contentHeader;

} else {
contentHeader = 'text/plain';
if (this._parsedContentDisposition.params.filename) {
let extension = pathlib.parse(this._parsedContentDisposition.params.filename).ext.replace(/^\./, '');
if (extension) {
contentHeader = libmime.detectMimeType(extension);
}
}
if (!contentHeader && /^attachment$/i.test(this._parsedContentDisposition.value)) {
contentHeader = 'application/octet-stream';
} else {
contentHeader = 'text/plain';
}
}

@@ -78,4 +92,2 @@

this._parsedContentDisposition = this.libmime.parseHeaderValue(this.headers.getFirst('Content-Disposition'));
this.encoding = this.headers

@@ -82,0 +94,0 @@ .getFirst('Content-Transfer-Encoding')

6

package.json
{
"name": "mailsplit",
"version": "5.2.0",
"version": "5.3.0",
"description": "Split email messages into an object stream",

@@ -20,3 +20,3 @@ "main": "index.js",

"devDependencies": {
"eslint": "7.32.0",
"eslint": "8.0.0",
"eslint-config-nodemailer": "1.2.0",

@@ -26,3 +26,3 @@ "eslint-config-prettier": "8.3.0",

"grunt-cli": "1.4.3",
"grunt-contrib-nodeunit": "3.0.0",
"grunt-contrib-nodeunit": "4.0.0",
"grunt-eslint": "23.0.0",

@@ -29,0 +29,0 @@ "random-message": "1.1.0"

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