]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: acl: http_auth_group() must not accept any user from the userlist
authorWilly Tarreau <w@1wt.eu>
Thu, 10 May 2012 21:18:26 +0000 (23:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 10 May 2012 21:18:26 +0000 (23:18 +0200)
commit4a3fd4c8df194f530301bf8a7eeee9cffb2025c2
treed1c4a717f223c00de19b3561e8404a2feed8e65b
parent20a804ac6d876cc1b3307fac0b0d67499bee831a
BUG/MAJOR: acl: http_auth_group() must not accept any user from the userlist

http_auth and http_auth_group used to share the same fetch function, while
they're doing very different things. The first one only checks whether the
supplied credentials are valid wrt a userlist while the second not only
checks this but also checks group ownership from a list of patterns.

Recent acl/pattern merge caused a simplification here by which the fetch
function would always return a boolean, so the group match was always fine
if the user:password was valid, regardless of the patterns provided with
the ACL.

The proper solution consists in splitting the function in two, depending
on what is desired.

It's also worth noting that check_user() would probably be split, one to
check user:password, and the other one to check for group ownership for
an already valid user:password combination. At this point it is not certain
if the group mask is still useful or not considering that the passwd check
is always made.

This bug was reported and diagnosed by Cyril Bonté. It first appeared
in 1.5-dev9 so it does not need any backporting.
src/proto_http.c