Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mech_MX): fix crit error on logging undef addrs #31

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).

### Unreleased

### [1.2.8] - 2024-10-07

- fix: mech_MX crit error on logging undef addrs

### [1.2.7] - 2024-08-14

- test: in index.js, unref timers, so test suite exits
Expand Down
4 changes: 2 additions & 2 deletions lib/spf.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,8 @@ class SPF {
}
}

this.log_debug(`mech_mx: mx=${mx} addresses=${addrs.join(',')}`)
addresses = addrs.concat(addresses)
this.log_debug(`mech_mx: mx=${mx} addresses=${addrs?.join(',')}`)
addresses = addrs ? addrs.concat(addresses) : [];
}

if (!addresses.length) return this.SPF_NONE
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haraka-plugin-spf",
"version": "1.2.7",
"version": "1.2.8",
"description": "Sender Policy Framework (SPF) plugin for Haraka",
"main": "index.js",
"files": [
Expand Down