Socket
Socket
Sign inDemoInstall

nodemailer

Package Overview
Dependencies
Maintainers
1
Versions
271
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodemailer - npm Package Compare versions

Comparing version 6.6.0 to 6.6.1

4

CHANGELOG.md
# CHANGELOG
## 6.6.1 2021-05-23
- Fixed address formatting issue where newlines in an email address, if provided via address object, were not properly removed. Reported by tmazeika (#1289)
## 6.6.0 2021-04-28

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

34

lib/mime-node/index.js

@@ -1150,5 +1150,5 @@ /* eslint no-undefined: 0, prefer-spread: 0, no-control-regex: 0 */

if (!address.name) {
values.push(address.address);
values.push(address.address.indexOf(' ') >= 0 ? `<${address.address}>` : `${address.address}`);
} else if (address.name) {
values.push(this._encodeAddressName(address.name) + ' <' + address.address + '>');
values.push(`${this._encodeAddressName(address.name)} <${address.address}>`);
}

@@ -1162,5 +1162,4 @@

} else if (address.group) {
values.push(
this._encodeAddressName(address.name) + ':' + (address.group.length ? this._convertAddresses(address.group, uniqueList) : '').trim() + ';'
);
let groupListAddresses = (address.group.length ? this._convertAddresses(address.group, uniqueList) : '').trim();
values.push(`${this._encodeAddressName(address.name)}:${groupListAddresses};`);
}

@@ -1179,3 +1178,6 @@ });

_normalizeAddress(address) {
address = (address || '').toString().trim();
address = (address || '')
.toString()
.replace(/[\x00-\x1F<>]+/g, ' ') // remove unallowed characters
.trim();

@@ -1187,2 +1189,3 @@ let lastAt = address.lastIndexOf('@');

}
let user = address.substr(0, lastAt);

@@ -1196,3 +1199,20 @@ let domain = address.substr(lastAt + 1);

return user + '@' + punycode.toASCII(domain.toLowerCase());
let encodedDomain;
try {
encodedDomain = punycode.toASCII(domain.toLowerCase());
} catch (err) {
// keep as is?
}
if (user.indexOf(' ') >= 0) {
if (user.charAt(0) !== '"') {
user = '"' + user;
}
if (user.substr(-1) !== '"') {
user = user + '"';
}
}
return `${user}@${encodedDomain}`;
}

@@ -1199,0 +1219,0 @@

{
"name": "nodemailer",
"version": "6.6.0",
"version": "6.6.1",
"description": "Easy as cake e-mail sending from your Node.js applications",

@@ -34,3 +34,3 @@ "main": "lib/nodemailer.js",

"libqp": "1.1.0",
"mocha": "8.3.2",
"mocha": "8.4.0",
"nodemailer-ntlm-auth": "1.0.1",

@@ -37,0 +37,0 @@ "proxy": "1.0.2",

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