- # we only allow a limited set of characters (colon is not allowed,
- # because we store usernames in colon separated lists)!
- if ($username =~ m/^([^\s:]+)\@(${realm_regex})$/) {
+ # we only allow a limited set of characters
+ # colon is not allowed, because we store usernames in
+ # colon separated lists)!
+ # slash is not allowed because it is used as pve API delimiter
+ # also see "man useradd"
+ if ($username =~ m!^([^\s:/]+)\@(${realm_regex})$!) {