nodemailer 6.4.10 → 6.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/CODE_OF_CONDUCT.md +76 -0
- package/lib/addressparser/index.js +14 -10
- package/package.json +6 -6
- package/postinstall.js +22 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 6.4.11 2020-07-29
|
|
4
|
+
|
|
5
|
+
- Fixed escape sequence handling in address parsing
|
|
6
|
+
|
|
3
7
|
## 6.4.10 2020-06-17
|
|
4
8
|
|
|
5
9
|
- Fixed RFC822 output for MailComposer when using invalid content-type value. Mostly relevant if message attachments have stragne content-type values set.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
* Using welcoming and inclusive language
|
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
|
19
|
+
* Gracefully accepting constructive criticism
|
|
20
|
+
* Focusing on what is best for the community
|
|
21
|
+
* Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
* Public or private harassment
|
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
+
threatening, offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
## Enforcement
|
|
56
|
+
|
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
+
reported by contacting the project team at info@nodemailer.com. All
|
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
|
63
|
+
|
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
+
members of the project's leadership.
|
|
67
|
+
|
|
68
|
+
## Attribution
|
|
69
|
+
|
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
72
|
+
|
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
|
74
|
+
|
|
75
|
+
For answers to common questions about this code of conduct, see
|
|
76
|
+
https://www.contributor-covenant.org/faq
|
|
@@ -73,7 +73,7 @@ function _handleAddress(tokens) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
let _regexHandler = function(address) {
|
|
76
|
+
let _regexHandler = function (address) {
|
|
77
77
|
if (!data.address.length) {
|
|
78
78
|
data.address = [address.trim()];
|
|
79
79
|
return ' ';
|
|
@@ -195,9 +195,9 @@ class Tokenizer {
|
|
|
195
195
|
* @param {String} chr Character from the address field
|
|
196
196
|
*/
|
|
197
197
|
checkChar(chr) {
|
|
198
|
-
if (
|
|
199
|
-
|
|
200
|
-
} else if (
|
|
198
|
+
if (this.escaped) {
|
|
199
|
+
// ignore next condition blocks
|
|
200
|
+
} else if (chr === this.operatorExpecting) {
|
|
201
201
|
this.node = {
|
|
202
202
|
type: 'operator',
|
|
203
203
|
value: chr
|
|
@@ -217,9 +217,7 @@ class Tokenizer {
|
|
|
217
217
|
this.operatorExpecting = this.operators[chr];
|
|
218
218
|
this.escaped = false;
|
|
219
219
|
return;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
if (!this.escaped && chr === '\\') {
|
|
220
|
+
} else if (['"', "'"].includes(this.operatorExpecting) && chr === '\\') {
|
|
223
221
|
this.escaped = true;
|
|
224
222
|
return;
|
|
225
223
|
}
|
|
@@ -232,11 +230,17 @@ class Tokenizer {
|
|
|
232
230
|
this.list.push(this.node);
|
|
233
231
|
}
|
|
234
232
|
|
|
235
|
-
if (
|
|
236
|
-
|
|
233
|
+
if (chr === '\n') {
|
|
234
|
+
// Convert newlines to spaces. Carriage return is ignored as \r and \n usually
|
|
235
|
+
// go together anyway and there already is a WS for \n. Lone \r means something is fishy.
|
|
236
|
+
chr = ' ';
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (chr.charCodeAt(0) >= 0x21 || [' ', '\t'].includes(chr)) {
|
|
240
|
+
// skip command bytes
|
|
241
|
+
this.node.value += chr;
|
|
237
242
|
}
|
|
238
243
|
|
|
239
|
-
this.node.value += chr;
|
|
240
244
|
this.escaped = false;
|
|
241
245
|
}
|
|
242
246
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodemailer",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.11",
|
|
4
4
|
"description": "Easy as cake e-mail sending from your Node.js applications",
|
|
5
5
|
"main": "lib/nodemailer.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,23 +21,23 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://nodemailer.com/",
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"bunyan": "1.8.
|
|
24
|
+
"bunyan": "1.8.14",
|
|
25
25
|
"chai": "4.2.0",
|
|
26
26
|
"eslint-config-nodemailer": "1.2.0",
|
|
27
27
|
"eslint-config-prettier": "6.11.0",
|
|
28
|
-
"grunt": "1.1
|
|
28
|
+
"grunt": "1.2.1",
|
|
29
29
|
"grunt-cli": "1.3.2",
|
|
30
30
|
"grunt-eslint": "23.0.0",
|
|
31
31
|
"grunt-mocha-test": "0.13.3",
|
|
32
32
|
"libbase64": "1.2.1",
|
|
33
|
-
"libmime": "
|
|
33
|
+
"libmime": "5.0.0",
|
|
34
34
|
"libqp": "1.1.0",
|
|
35
35
|
"mocha": "8.0.1",
|
|
36
36
|
"nodemailer-ntlm-auth": "1.0.1",
|
|
37
|
-
"proxy": "1.0.
|
|
37
|
+
"proxy": "1.0.2",
|
|
38
38
|
"proxy-test-server": "1.0.0",
|
|
39
39
|
"sinon": "9.0.2",
|
|
40
|
-
"smtp-server": "3.
|
|
40
|
+
"smtp-server": "3.7.0"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=6.0.0"
|
package/postinstall.js
CHANGED
|
@@ -17,14 +17,24 @@ Thank you for using Nodemailer for your email sending needs! While Nodemailer it
|
|
|
17
17
|
> Ethereal Email ( https://ethereal.email/ ) is an email testing service that accepts all your test emails
|
|
18
18
|
`;
|
|
19
19
|
|
|
20
|
+
const footer = `Don't like this message?
|
|
21
|
+
There's a Github Sponsors goal to remove it
|
|
22
|
+
https://github.com/sponsors/andris9
|
|
23
|
+
`;
|
|
24
|
+
|
|
20
25
|
const secs = 4;
|
|
21
26
|
|
|
22
27
|
const formatCentered = (row, columns) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
return row
|
|
29
|
+
.split(/\r?\n/)
|
|
30
|
+
.map(row => {
|
|
31
|
+
if (columns <= row.length) {
|
|
32
|
+
return row;
|
|
33
|
+
}
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
return ' '.repeat(Math.round(columns / 2 - row.length / 2)) + row;
|
|
36
|
+
})
|
|
37
|
+
.join('\n');
|
|
28
38
|
};
|
|
29
39
|
|
|
30
40
|
const formatRow = (row, columns) => {
|
|
@@ -59,10 +69,14 @@ const wrapText = text => {
|
|
|
59
69
|
let columns = Number(process.stdout.columns) || 80;
|
|
60
70
|
columns = Math.min(columns, 80) - 1;
|
|
61
71
|
|
|
62
|
-
return (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
72
|
+
return (
|
|
73
|
+
(formatCentered(title, columns) + '\n' + text)
|
|
74
|
+
.split('\n')
|
|
75
|
+
.flatMap(row => formatRow(row, columns))
|
|
76
|
+
.join('\n') +
|
|
77
|
+
'\n' +
|
|
78
|
+
formatCentered(footer, columns)
|
|
79
|
+
);
|
|
66
80
|
};
|
|
67
81
|
|
|
68
82
|
const banner = wrapText(text)
|