Validate target domain for CNAME records

Signed-off-by: yubiuser <ckoenig@posteo.de>
This commit is contained in:
yubiuser
2020-12-20 20:26:37 +01:00
parent c32bcd3715
commit c07b710d07

View File

@@ -302,6 +302,9 @@ function addCustomCNAMEEntry($domain="", $target="", $json=true)
if (empty($target))
return returnError("Target must be set", $json);
if (!is_valid_domain_name($target))
return returnError("Trget must be valid", $json);
// Check if each submitted domain is valid
$domains = array_map('trim', explode(",", $domain));
foreach ($domains as $d) {