]> git.proxmox.com Git - pve-access-control.git/commit - PVE/AccessControl.pm
parse_user_cfg: correctly parse group names in ACLs
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 3 Oct 2019 08:33:28 +0000 (10:33 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 3 Oct 2019 08:47:44 +0000 (10:47 +0200)
commit508e11f1845d235cf9ad83ea8b60d52f62e47856
tree171d8a74a40d9e35ed4c1ded328329af74fc0da4
parente073493cb31d606320fff3b9f74d114cfec5d1b3
parse_user_cfg: correctly parse group names in ACLs

usernames are allowed to start with '@', so adding a user '@test@pve'
and adding it to an ACL should work, instead of ignoring that part of
the ACL entry.

So use verify_groupname to additionally enforce that the group name we
extracted does not include an additional @, as then it cannot be a
group.

note: there is no potential for user and group to be confused, since a
username must end with '@REALM', and a group reference in an ACL can
only contain one '@' (as first character).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/AccessControl.pm