From 8a03bc6b42d24dbe024cbe6cbe80c5d14ae030d0 Mon Sep 17 00:00:00 2001 From: Herman van Rink <rink@initfour.nl> Date: Wed, 3 Mar 2021 20:22:26 +0100 Subject: [PATCH] dns_rr.name can be just the first part, or the full fqdn --- interface/web/dns/dns_dmarc_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php index c49b60fc78..00df3e88c0 100644 --- a/interface/web/dns/dns_dmarc_edit.php +++ b/interface/web/dns/dns_dmarc_edit.php @@ -228,8 +228,8 @@ class page_action extends tform_actions { // DMARC requieres at least one active dkim-record... $sql = "SELECT * FROM dns_rr LEFT JOIN dns_soa ON (dns_rr.zone=dns_soa.id) - WHERE dns_rr.name LIKE ? AND dns_soa.origin = ? AND type='TXT' AND data like 'v=DKIM1;%' AND dns_rr.active='Y'"; - $temp = $app->db->queryAllRecords($sql, '%._domainkey', $soa['origin']); + WHERE dns_soa.origin = ? AND dns_rr.name LIKE ? AND type='TXT' AND data like 'v=DKIM1;%' AND dns_rr.active='Y'"; + $temp = $app->db->queryAllRecords($sql, $soa['origin'], '%._domainkey%'); if (empty($temp)) { if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '<br/>' . $app->tform->errorMessage; $app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_dkim_txt'].$email; -- GitLab