File tree Expand file tree Collapse file tree 6 files changed +21
-13
lines changed Expand file tree Collapse file tree 6 files changed +21
-13
lines changed Original file line number Diff line number Diff line change 5
5
branches : [master]
6
6
pull_request :
7
7
branches : [master]
8
- schedule :
9
- - cron : ' 18 7 * * 4'
10
8
11
9
jobs :
12
10
codeql :
Original file line number Diff line number Diff line change @@ -4,8 +4,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
4
4
5
5
### Unreleased
6
6
7
- - fix: undefined variable in mech_mx if no valid MX found
7
+ ### [ 1.2.9] - 2024-11-19
8
+
9
+ - fix: undefined variable exception when no MX is found, #32
8
10
- add: new spf_record_include_match property to allow for additional filtering
11
+ - deps: bump versions to latest
9
12
10
13
### [ 1.2.8] - 2024-10-07
11
14
@@ -95,3 +98,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
95
98
[ 1.2.4 ] : https://github.com/haraka/haraka-plugin-spf/releases/tag/v1.2.4
96
99
[ 1.2.5 ] : https://github.com/haraka/haraka-plugin-spf/releases/tag/v1.2.5
97
100
[ 1.2.7 ] : https://github.com/haraka/haraka-plugin-spf/releases/tag/v1.2.7
101
+ [ 1.2.9 ] : https://github.com/haraka/haraka-plugin-spf/releases/tag/v1.2.9
Original file line number Diff line number Diff line change 2
2
3
3
This handcrafted artisinal software is brought to you by:
4
4
5
- | <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/haraka/haraka-plugin-spf/commits?author=msimerson">14</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/550490?v=4"><br><a href="https://github.com/smfreegard">smfreegard</a> (<a href="https://github.com/haraka/haraka-plugin-spf/commits?author=smfreegard">3</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/82041?v=4"><br><a href="https://github.com/gramakri">gramakri</a> (<a href="https://github.com/haraka/haraka-plugin-spf/commits?author=gramakri">1</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/918201?v=4"><br><a href="https://github.com/DoobleD">DoobleD</a> (<a href="https://github.com/haraka/haraka-plugin-spf/commits?author=DoobleD">1</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/8930018?v=4"><br><a href="https://github.com/ne4t0">ne4t0</a> (<a href="https://github.com/haraka/haraka-plugin-spf/commits?author=ne4t0">1</a>) |
6
- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
5
+ | <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/haraka/haraka-plugin-spf/commits?author=msimerson">15</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/550490?v=4"><br><a href="https://github.com/smfreegard">smfreegard</a> (<a href="https://github.com/haraka/haraka-plugin-spf/commits?author=smfreegard">4</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/918201?v=4"><br><a href="https://github.com/DoobleD">DoobleD</a> (<a href="https://github.com/haraka/haraka-plugin-spf/commits?author=DoobleD">2</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/82041?v=4"><br><a href="https://github.com/gramakri">gramakri</a> (<a href="https://github.com/haraka/haraka-plugin-spf/commits?author=gramakri">1</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/8930018?v=4"><br><a href="https://github.com/ne4t0">ne4t0</a> (<a href="https://github.com/haraka/haraka-plugin-spf/commits?author=ne4t0">1</a>) |
6
+ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
7
7
8
8
<sub >this file is maintained by [ .release] ( https://github.com/msimerson/.release ) </sub >
Original file line number Diff line number Diff line change @@ -362,7 +362,10 @@ class SPF {
362
362
switch ( result ) {
363
363
case this . SPF_PASS :
364
364
// Store matching "include" mechanisms
365
- this . spf_record_include_match = { ...this . spf_record_include_match , ...recurse . spf_record_include_match }
365
+ this . spf_record_include_match = {
366
+ ...this . spf_record_include_match ,
367
+ ...recurse . spf_record_include_match ,
368
+ }
366
369
this . spf_record_include_match [ domain ] = recurse . spf_record
367
370
return this . SPF_PASS
368
371
case this . SPF_FAIL :
@@ -512,7 +515,7 @@ class SPF {
512
515
resolve_method = 'resolve6'
513
516
}
514
517
515
- let addrs = [ ] ;
518
+ let addrs = [ ]
516
519
try {
517
520
addrs = await dns [ resolve_method ] ( mx )
518
521
} catch ( err ) {
@@ -527,7 +530,7 @@ class SPF {
527
530
}
528
531
529
532
this . log_debug ( `mech_mx: mx=${ mx } addresses=${ addrs ?. join ( ',' ) } ` )
530
- addresses = addrs ? addrs . concat ( addresses ) : [ ] ;
533
+ addresses = addrs ? addrs . concat ( addresses ) : [ ]
531
534
}
532
535
533
536
if ( ! addresses . length ) return this . SPF_NONE
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " haraka-plugin-spf" ,
3
- "version" : " 1.2.8 " ,
3
+ "version" : " 1.2.9 " ,
4
4
"description" : " Sender Policy Framework (SPF) plugin for Haraka" ,
5
5
"main" : " index.js" ,
6
6
"files" : [
40
40
},
41
41
"dependencies" : {
42
42
"haraka-dsn" : " ^1.1.0" ,
43
- "haraka-net-utils" : " ^1.7.0 " ,
43
+ "haraka-net-utils" : " ^1.7.1 " ,
44
44
"ipaddr.js" : " ^2.2.0" ,
45
- "nopt" : " ^7.2.1 "
45
+ "nopt" : " ^8.0.0 "
46
46
},
47
47
"devDependencies" : {
48
48
"@haraka/eslint-config" : " ^1.1.5" ,
49
- "haraka-test-fixtures" : " ^1.3.7 "
49
+ "haraka-test-fixtures" : " ^1.3.8 "
50
50
}
51
51
}
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ describe('SPF', function () {
112
112
this . timeout = 3000
113
113
this . SPF . count = 0
114
114
await this . SPF . check_host ( '130.211.0.1' , 'google.com' )
115
- assert . ok ( this . SPF . spf_record_include_match ?. [ '_netblocks3.google.com' ] , 'expected include not found' )
115
+ assert . ok (
116
+ this . SPF . spf_record_include_match ?. [ '_netblocks3.google.com' ] ,
117
+ 'expected include not found' ,
118
+ )
116
119
} )
117
120
} )
You can’t perform that action at this time.
0 commit comments