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

libmime

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libmime - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

4

CHANGELOG.md
# Changelog
## v2.1.2 2016-11-21
* Quote special symbols as defined in RFC (surajwy)
## v2.1.1 2016-11-15

@@ -4,0 +8,0 @@

7

lib/libmime.js

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

* Joins parsed header value together as 'value; param1=value1; param2=value2'
*
* PS: We are following RFC 822 for the list of special characters that we need to keep in quotes.
* Refer: https://www.w3.org/Protocols/rfc1341/4_Content-Type.html
* @param {Object} structured Parsed header value

@@ -343,3 +344,3 @@ * @return {String} joined header value

libmime.buildHeaderParam(param, value, 50).forEach(function (encodedParam) {
if (!/[\s"\\;\/=\(\),]|^[\-']|'$/.test(encodedParam.value) || encodedParam.key.substr(-1) === '*') {
if (!/[\s"\\;:\/=\(\),<>@\[\]\?\.]|^[\-']|'$/.test(encodedParam.value) || encodedParam.key.substr(-1) === '*') {
paramsArray.push(encodedParam.key + '=' + encodedParam.value);

@@ -350,3 +351,3 @@ } else {

});
} else if (/[\s'"\\;\/=\(\),]|^\-/.test(value)) {
} else if (/[\s'"\\;:\/=\(\),<>@\[\]\?\.]|^\-/.test(value)) {
paramsArray.push(param + '=' + JSON.stringify(value));

@@ -353,0 +354,0 @@ } else {

{
"name": "libmime",
"description": "Encode and decode quoted printable and base64 strings",
"version": "2.1.1",
"version": "2.1.2",
"main": "lib/libmime",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/andris9/libmime",

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