Skip to content
Snippets Groups Projects
Commit 20a04da2 authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'Fix6357' into 'develop'

Fixed Wrong DNS Validation #6357

See merge request ispconfig/ispconfig3!1616
parents e50c6f9e 332c1f5c
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,10 @@ $app->load('tform_actions');
class dns_page_action extends tform_actions {
protected function checkDuplicate() {
global $app;
// If a CNAME RR is present at a node, no other data should be present
$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);
if($tmp['number'] > 0) return true;
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment