From 2af680e7db66a4fdabff8e48975699686e184c3e Mon Sep 17 00:00:00 2001 From: thom Date: Tue, 15 Sep 2020 14:23:40 +0200 Subject: [PATCH] Only change names with just @ or * --- interface/web/dns/dns_edit_base.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/web/dns/dns_edit_base.php b/interface/web/dns/dns_edit_base.php index f12c38e81..a94bd5494 100644 --- a/interface/web/dns/dns_edit_base.php +++ b/interface/web/dns/dns_edit_base.php @@ -114,13 +114,13 @@ class dns_page_action extends tform_actions { } // end if user is not admin // Replace @ to example.com. - if(stristr($this->dataRecord["name"], '@')) { - $this->dataRecord["name"] = str_replace('@', $soa['origin'], $this->dataRecord["name"]); + if($this->dataRecord["name"] === '@') { + $this->dataRecord["name"] = $soa['origin']; } // Replace * to *.example.com. - if(stristr($this->dataRecord["name"], '*')) { - $this->dataRecord["name"] = str_replace('*', '*.' . $soa['origin'], $this->dataRecord["name"]); + if($this->dataRecord["name"] === '*') { + $this->dataRecord["name"] = '*.' . $soa['origin']; } if($this->checkDuplicate()) $app->tform->errorMessage .= $app->tform->lng("data_error_duplicate")."
"; -- GitLab