mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
system_certmanager, allow wildcards in alternative name, for https://github.com/opnsense/core/issues/2858
This commit is contained in:
parent
66709dbbfa
commit
d573662f5e
@ -340,7 +340,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
foreach ($altnames as $altname) {
|
||||
switch ($altname['type']) {
|
||||
case "DNS":
|
||||
if (!is_hostname($altname['value'])) {
|
||||
$dns_regex = '/^(?:(?:[a-z0-9_\*]|[a-z0-9_][a-z0-9_\-]*[a-z0-9_])\.)*(?:[a-z0-9_]|[a-z0-9_][a-z0-9_\-]*[a-z0-9_])$/i';
|
||||
if (!preg_match($dns_regex, $altname['value'])) {
|
||||
$input_errors[] = gettext("DNS subjectAltName values must be valid hostnames or FQDNs");
|
||||
}
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user