mailauth 4.8.1 → 4.8.2

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.8.2](https://github.com/postalsys/mailauth/compare/v4.8.1...v4.8.2) (2024-12-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **ARC:** ensure that instance value is 1 if ARC chain does not exist yet ([ab4c5e9](https://github.com/postalsys/mailauth/commit/ab4c5e9ae0158e196b10f346321ca55b8f06c679))
9
+
3
10
  ## [4.8.1](https://github.com/postalsys/mailauth/compare/v4.8.0...v4.8.1) (2024-11-05)
4
11
 
5
12
 
package/lib/arc/index.js CHANGED
@@ -78,6 +78,8 @@ const verifyAS = async (chain, opts) => {
78
78
  const signAS = async (chain, entry, signatureData) => {
79
79
  let { instance, algorithm, selector, signingDomain, bodyHash, cv, signTime, privateKey } = signatureData;
80
80
 
81
+ instance = instance || 1;
82
+
81
83
  const signAlgo = algorithm?.split('-').shift();
82
84
 
83
85
  signTime = signTime || new Date();
@@ -497,6 +499,8 @@ const createSeal = async (input, data) => {
497
499
  await dkimSigner.finalize();
498
500
  }
499
501
 
502
+ seal.i = seal.i || 1;
503
+
500
504
  const authResults = `ARC-Authentication-Results: i=${seal.i}; ${seal.authResults}`;
501
505
 
502
506
  // Step 2. Calculate ARC-Seal
@@ -266,7 +266,7 @@ class DkimSigner extends MessageParser {
266
266
  {},
267
267
  signatureData,
268
268
  {
269
- instance: this.arc?.instance, // ARC only
269
+ instance: 'instance' in this.arc && (this.arc.instance || 1), // ARC only
270
270
  algorithm,
271
271
  canonicalization: this.getCanonicalization(signatureData).canonicalization,
272
272
 
package/man/mailauth.1 CHANGED
@@ -1,4 +1,4 @@
1
- .TH "MAILAUTH" "1" "November 2024" "v4.8.1" "Mailauth Help"
1
+ .TH "MAILAUTH" "1" "December 2024" "v4.8.2" "Mailauth Help"
2
2
  .SH "NAME"
3
3
  \fBmailauth\fR
4
4
  .QP
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailauth",
3
- "version": "4.8.1",
3
+ "version": "4.8.2",
4
4
  "description": "Email authentication library for Node.js",
5
5
  "main": "lib/mailauth.js",
6
6
  "scripts": {
@@ -38,21 +38,21 @@
38
38
  "eslint-config-nodemailer": "1.2.0",
39
39
  "eslint-config-prettier": "9.1.0",
40
40
  "js-yaml": "4.1.0",
41
- "license-report": "6.7.0",
41
+ "license-report": "6.7.1",
42
42
  "marked": "0.7.0",
43
43
  "marked-man": "0.7.0",
44
44
  "mbox-reader": "1.2.0",
45
- "mocha": "10.8.2"
45
+ "mocha": "11.0.1"
46
46
  },
47
47
  "dependencies": {
48
48
  "@postalsys/vmc": "1.1.0",
49
- "fast-xml-parser": "4.5.0",
49
+ "fast-xml-parser": "4.5.1",
50
50
  "ipaddr.js": "2.2.0",
51
51
  "joi": "17.13.3",
52
- "libmime": "5.3.5",
52
+ "libmime": "5.3.6",
53
53
  "nodemailer": "6.9.16",
54
54
  "punycode.js": "2.3.1",
55
- "tldts": "6.1.58",
55
+ "tldts": "6.1.68",
56
56
  "undici": "5.28.4",
57
57
  "yargs": "17.7.2"
58
58
  },