Skip to content

Commit 1ccff14

Browse files
author
thom
committed
Convert @ and * to full hostname (#5558 and #5463)
1 parent acb7db0 commit 1ccff14

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

interface/web/dns/dns_edit_base.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,17 @@ function onSubmit() {
112112
}
113113
}
114114
} // end if user is not admin
115-
115+
116+
//* Replace @ to domain name
117+
if(stristr($this->dataRecord["name"], '@')) {
118+
$this->dataRecord["name"] = str_replace('@', $soa['origin'], $this->dataRecord["name"]);
119+
}
120+
121+
//* Replace * to *.example.com.
122+
if(stristr($this->dataRecord["name"], '*')) {
123+
$this->dataRecord["name"] = str_replace('*', '*.' . $soa['origin'], $this->dataRecord["name"]);
124+
}
125+
116126
if($this->checkDuplicate()) $app->tform->errorMessage .= $app->tform->lng("data_error_duplicate")."<br>";
117127

118128
// Set the server ID of the rr record to the same server ID as the parent record.

0 commit comments

Comments
 (0)