Commit d84a2dcb authored by Florian Schaal's avatar Florian Schaal
Browse files

fixed sql-queries in dns_dmarc_edit.php

parent 74df3125
...@@ -227,14 +227,14 @@ class page_action extends tform_actions { ...@@ -227,14 +227,14 @@ class page_action extends tform_actions {
$domain_name = rtrim($soa['origin'], '.'); $domain_name = rtrim($soa['origin'], '.');
// DMARC requieres at least one active dkim-record... // DMARC requieres at least one active dkim-record...
$sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND data like 'v=DKIM1;%' AND active='Y'"; $sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND data like 'v=DKIM1;%' AND active='Y'";
$temp = $app->db->queryAllRecords($sql, '%._domainkey.$domain_name'.'.'); $temp = $app->db->queryAllRecords($sql, '%._domainkey.'.$domain_name.'.');
if (!is_array($temp)) { if (empty($temp)) {
if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '<br/>' . $app->tform->errorMessage; if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '<br/>' . $app->tform->errorMessage;
$app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_dkim_txt'].$email; $app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_dkim_txt'].$email;
} }
// ... and an active spf-record (this breaks the current draft but DMARC is useless if you use DKIM or SPF // ... and an active spf-record (this breaks the current draft but DMARC is useless if you use DKIM or SPF
$sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND (data LIKE 'v=spf1;%' AND active = 'y')"; $sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND (data LIKE 'v=spf1%' AND active = 'y')";
$temp = $app->db->queryAllRecords($sql, $domain_name.'.'); $temp = $app->db->queryAllRecords($sql, $domain_name.'.');
// abort if more than 1 active spf-records (backward-compatibility) // abort if more than 1 active spf-records (backward-compatibility)
if (is_array($temp[1])) { if (is_array($temp[1])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment