Commit 2af680e7 authored by Thom's avatar Thom 🛠

Only change names with just @ or *

parent c08601c2
......@@ -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")."<br>";
......
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