File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -236,8 +236,10 @@ function onSubmit() {
236236 }
237237
238238 // ... and an active spf-record (this breaks the current draft but DMARC is useless if you use DKIM or SPF
239- $ sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND (data LIKE 'v=spf1%' AND active = 'y') " ;
240- $ temp = $ app ->db ->queryAllRecords ($ sql , $ domain_name .'. ' );
239+ $ sql = "SELECT * FROM dns_rr
240+ LEFT JOIN dns_soa ON (dns_rr.zone=dns_soa.id)
241+ WHERE dns_soa.origin = ? AND (dns_rr.name LIKE ? OR dns_rr.name = '') AND type='TXT' AND data like 'v=spf1%' AND dns_rr.active='Y' " ;
242+ $ temp = $ app ->db ->queryAllRecords ($ sql , $ soa ['origin ' ], $ soa ['origin ' ]);
241243 // abort if more than 1 active spf-records (backward-compatibility)
242244 if (is_array ($ temp [1 ])) {
243245 if (isset ($ app ->tform ->errorMessage )) $ app ->tform ->errorMessage = '<br/> ' . $ app ->tform ->errorMessage ;
You can’t perform that action at this time.
0 commit comments