MVC - HostnameField and ZoneRootAllowed, make sure we allow @.my.sub.domain as valid input. closes https://github.com/opnsense/core/issues/6155

This commit is contained in:
Ad Schellevis 2022-11-26 09:17:45 +01:00
parent 5586e49d86
commit b584e1375d

View File

@ -64,6 +64,8 @@ class HostValidator extends BaseValidator
$filterOptIp = FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6;
if ($allow_fqdnwildcard && substr($value, 0, 2) == '*.') {
$value = substr($value, 2);
} elseif ($allow_zoneroot && substr($value, 0, 2) == '@.') {
$value = substr($value, 2);
}
if ($allow_zoneroot && $value == '@') {
$result = true;