mirror of
https://git.proxmox.com/git/pve-network
synced 2025-07-27 13:33:04 +00:00
controllers: allow minus and underscore in IDs again
commit 7c5b0f6
not only reduced the possible length but also the
accepted character set, revert the latter partially again and allow
using minus and underscore for characters not being the start or end.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
3f557f268d
commit
f81ad67fc9
@ -25,7 +25,7 @@ PVE::JSONSchema::register_format('pve-sdn-controller-id', \&parse_sdn_controller
|
||||
sub parse_sdn_controller_id {
|
||||
my ($id, $noerr) = @_;
|
||||
|
||||
if ($id !~ m/^[a-z][a-z0-9]*[a-z0-9]$/i) {
|
||||
if ($id !~ m/^[a-z][a-z0-9_-]*[a-z0-9]$/i) {
|
||||
return undef if $noerr;
|
||||
die "controller ID '$id' contains illegal characters\n";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user