mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Do not allow a group name to start with 'pkg-', reserve it for packages use (e.g. tinc)
This commit is contained in:
parent
2326f3252a
commit
ebdcad3bd3
@ -79,6 +79,14 @@ if ($_POST) {
|
||||
$input_errors[] = gettext("Group name cannot end with digit.");
|
||||
}
|
||||
|
||||
/*
|
||||
* Packages (e.g. tinc) creates interface groups, reserve this
|
||||
* namespace pkg- for them
|
||||
*/
|
||||
if (substr($_POST['ifname'], 0, 4) == 'pkg-') {
|
||||
$input_errors[] = gettext("Group name cannot start with pkg-");
|
||||
}
|
||||
|
||||
foreach ($interface_list_disabled as $gif => $gdescr) {
|
||||
if ($gdescr == $_POST['ifname'] || $gif == $_POST['ifname']) {
|
||||
$input_errors[] = "The specified group name is already used by an interface. Please choose another name.";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user