nodemailer
Advanced tools
Comparing version 4.4.1 to 4.4.2
# CHANGELOG | ||
## 4.4.2 2018-01-20 | ||
- Added sponsors section to README | ||
- enclose encodeURIComponent in try..catch to handle invalid urls | ||
## 4.4.1 2017-12-08 | ||
@@ -4,0 +9,0 @@ |
@@ -90,10 +90,22 @@ 'use strict'; | ||
} else if (typeof options.body === 'object') { | ||
body = Buffer.from( | ||
Object.keys(options.body) | ||
.map(key => { | ||
let value = options.body[key].toString().trim(); | ||
return encodeURIComponent(key) + '=' + encodeURIComponent(value); | ||
}) | ||
.join('&') | ||
); | ||
try { | ||
// encodeURIComponent can fail on invalid input (partial emoji etc.) | ||
body = Buffer.from( | ||
Object.keys(options.body) | ||
.map(key => { | ||
let value = options.body[key].toString().trim(); | ||
return encodeURIComponent(key) + '=' + encodeURIComponent(value); | ||
}) | ||
.join('&') | ||
); | ||
} catch (E) { | ||
if (finished) { | ||
return; | ||
} | ||
finished = true; | ||
E.type = 'FETCH'; | ||
E.sourceUrl = url; | ||
fetchRes.emit('error', E); | ||
return; | ||
} | ||
} else { | ||
@@ -100,0 +112,0 @@ body = Buffer.from(options.body.toString().trim()); |
{ | ||
"name": "nodemailer", | ||
"version": "4.4.1", | ||
"version": "4.4.2", | ||
"description": "Easy as cake e-mail sending from your Node.js applications", | ||
@@ -30,9 +30,9 @@ "main": "lib/nodemailer.js", | ||
"grunt-mocha-test": "^0.13.3", | ||
"libbase64": "^1.0.1", | ||
"libbase64": "^1.0.2", | ||
"libmime": "^3.1.0", | ||
"libqp": "^1.1.0", | ||
"mocha": "^4.0.1", | ||
"mocha": "^5.0.0", | ||
"proxy": "^0.2.4", | ||
"proxy-test-server": "^1.0.0", | ||
"sinon": "^4.1.3", | ||
"sinon": "^4.1.6", | ||
"smtp-server": "^3.4.1" | ||
@@ -39,0 +39,0 @@ }, |
@@ -37,4 +37,10 @@ # Nodemailer | ||
## Sponsors | ||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/nodemailer#sponsor)] | ||
<a href="https://opencollective.com/nodemailer/sponsor/0/website" target="_blank"><img src="https://opencollective.com/nodemailer/sponsor/0/avatar.svg"></a> | ||
### License | ||
Nodemailer is licensed under the **MIT license** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
507740
10805
46