From: Dietmar Maurer Date: Tue, 24 Apr 2012 08:10:35 +0000 (+0200) Subject: do not allow user names including slash X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=3030a17643d9f303d1d1820e972f9ed9ce74fdd2;p=pve-access-control.git do not allow user names including slash --- diff --git a/Makefile b/Makefile index 9e3dd68..03310c4 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ RELEASE=2.0 VERSION=1.0 PACKAGE=libpve-access-control -PKGREL=19 +PKGREL=21 DESTDIR= PREFIX=/usr diff --git a/PVE/AccessControl.pm b/PVE/AccessControl.pm index 2b7974d..6943ed4 100644 --- a/PVE/AccessControl.pm +++ b/PVE/AccessControl.pm @@ -732,9 +732,12 @@ sub verify_username { return undef; } - # 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})$!) { return wantarray ? ($username, $1, $2) : $username; } diff --git a/changelog.Debian b/changelog.Debian index 2bc47f4..bc9c76f 100644 --- a/changelog.Debian +++ b/changelog.Debian @@ -1,3 +1,15 @@ +libpve-access-control (1.0-21) unstable; urgency=low + + * do not allow user names including slash + + -- Proxmox Support Team Tue, 24 Apr 2012 10:07:47 +0200 + +libpve-access-control (1.0-20) unstable; urgency=low + + * add ability to fork cli workers in background + + -- Proxmox Support Team Wed, 18 Apr 2012 08:28:20 +0200 + libpve-access-control (1.0-19) unstable; urgency=low * return set of privileges on login - can be used to adopt GUI