From 8cda23350167b8ebc715a1446c18b6097455868c Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Fri, 16 Nov 2018 18:28:48 -0800 Subject: [PATCH] dkim_sign: use get_decoded instead of header.get (#2540) * dkim_sign: use get_decoded instead of header.get * depend on newer haraka-test-fixtures with get_decoded * bump test-fixtures version --- .gitignore | 1 + package.json | 2 +- plugins/dkim_sign.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 52f615275..97b425724 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ coverage .idea tests/queue/plain tests/queue/multibyte +package-lock.json diff --git a/package.json b/package.json index 66a728255..229dd1402 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ }, "devDependencies": { "nodeunit" : "*", - "haraka-test-fixtures" : ">=1.0.24", + "haraka-test-fixtures" : ">=1.0.27", "eslint" : ">=3", "eslint-plugin-haraka" : "*", "nodemailer" : "*" diff --git a/plugins/dkim_sign.js b/plugins/dkim_sign.js index 4ae27d50a..c4dc1e721 100644 --- a/plugins/dkim_sign.js +++ b/plugins/dkim_sign.js @@ -324,7 +324,7 @@ exports.get_sender_domain = function (connection) { // the DKIM signing key should be aligned with the domain in the From // header (see DMARC). Try to parse the domain from there. - const from_hdr = txn.header.get('From'); + const from_hdr = txn.header.get_decoded('From'); if (!from_hdr) return domain; // The From header can contain multiple addresses and should be