]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http-fetch: check against the whole token in get_http_auth()
authorWilly Tarreau <w@1wt.eu>
Tue, 26 May 2026 06:28:33 +0000 (08:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 26 May 2026 11:13:24 +0000 (13:13 +0200)
commite583b38c63939e334bd85321689413cd139953c0
tree1f3c4faefd945ff95e81a16d56642d156890543b
parentffdc91c4a19a589f23eabb6df0ad6075802949fb
BUG/MINOR: http-fetch: check against the whole token in get_http_auth()

In 1.4, Basic authentication support was added by commit f9423ae43a
("[MINOR] acl: add http_auth and http_auth_group"). Interestingly,
a mistake there consisted in taking the length of the comparison from
the input token, so "b" matches "Basic". It was later propagated to
Bearer in 2.5 with commit f5dd337b12 ("MINOR: http:
Add http_auth_bearer sample fetch"). Let's just compare the entire
tokens.

This may be backported though it is very minor.
src/http_fetch.c