Skip to content

Commit 20a04da

Browse files
author
Till Brehm
committed
Merge branch 'Fix6357' into 'develop'
Fixed Wrong DNS Validation #6357 See merge request ispconfig/ispconfig3!1616
2 parents e50c6f9 + 332c1f5 commit 20a04da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

interface/web/dns/dns_edit_base.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
class dns_page_action extends tform_actions {
4242

4343
protected function checkDuplicate() {
44+
global $app;
45+
// If a CNAME RR is present at a node, no other data should be present
46+
$tmp = $app->db->queryOneRecord("SELECT count(dns_rr.id) as number FROM dns_rr LEFT JOIN dns_soa ON dns_rr.zone = dns_soa.id WHERE (type = 'CNAME' AND ( name = replace(?, concat('.', dns_soa.origin), '') or name = ? or name = concat(?,'.',dns_soa.origin) ) AND zone = ? and dns_rr.id != ?)", $this->dataRecord["name"], $this->dataRecord["name"], $this->dataRecord["name"], $this->dataRecord["zone"], $this->id);
47+
if($tmp['number'] > 0) return true;
4448
return false;
4549
}
4650

0 commit comments

Comments
 (0)