interfaces: long group names vs. pf(4)

PR: https://forum.opnsense.org/index.php?topic=12527.0
This commit is contained in:
Franco Fichtner 2019-04-26 05:42:22 +02:00
parent 6b8fc100e4
commit d40c917fcb

View File

@ -57,8 +57,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
}
}
if (preg_match("/([^a-zA-Z0-9_])+/", $pconfig['ifname'], $match) || empty($pconfig['ifname'])) {
$input_errors[] = gettext("Only letters A-Z are allowed as the group name.");
if (preg_match('/([^a-zA-Z0-9_])+/', $pconfig['ifname'], $match) || empty($pconfig['ifname'])) {
$input_errors[] = gettext('Only letters, digits and underscores are allowed as the group name.');
}
if (!empty($pconfig['ifname']) && strlen($pconfig['ifname']) > 15) {
$input_errors[] = gettext('The group name shall not be longer than 15 characters.');
}
foreach (get_configured_interface_with_descr() as $gif => $gdescr) {