Change regex from "m/^[a-zA-Z0-9]+$/" to "m/^[a-zA-Z0-9\-]+$/" to allow hyphen in ldap attribute names for pve & pmg.
Signed-off-by: Markus Frank <m.fr...@proxmox.com> --- There does not seem to be a regex for LDAP attributes in pbs. Should a regex be added for this? src/PVE/JSONSchema.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 49e0d7a..ef58b62 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -408,7 +408,7 @@ PVE::JSONSchema::register_format('ldap-simple-attr', \&verify_ldap_simple_attr); sub verify_ldap_simple_attr { my ($attr, $noerr) = @_; - if ($attr =~ m/^[a-zA-Z0-9]+$/) { + if ($attr =~ m/^[a-zA-Z0-9\-]+$/) { return $attr; } -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel