caddy/modules/caddyhttp/caddyauth
Venkatesh Panda b01a31c635
caddyauth: Don't write into shared hash buffer when building cache key (#8278)
HTTPBasicAuth.correctPassword built its hash cache key with
append(account.password, plaintextPassword...). account.password is
shared by all requests and can have spare capacity, so short passwords
were written into the stored hash's backing array, causing a data race
between concurrent requests and potentially mixed-up cache keys.

Build the key in a fresh buffer instead, and add regression tests.

(cherry picked from commit f89626aa55)
2026-11-03 18:25:44 -05:00
..
argon2id.go basicauth: Implement argon2id (#7186) 2025-10-06 17:27:06 -06:00
basicauth.go caddyauth: Don't write into shared hash buffer when building cache key (#8278) 2026-11-03 18:25:44 -05:00
basicauth_test.go caddyauth: Don't write into shared hash buffer when building cache key (#8278) 2026-11-03 18:25:44 -05:00
bcrypt.go basicauth: Implement argon2id (#7186) 2025-10-06 17:27:06 -06:00
caddyauth.go caddyauth: isolate provider responses to prevent cross-provider clobbering (#7904) 2026-08-01 12:19:27 +10:00
caddyauth_test.go caddyauth: isolate provider responses to prevent cross-provider clobbering (#7904) 2026-08-01 12:19:27 +10:00
caddyfile.go basicauth: Implement argon2id (#7186) 2025-10-06 17:27:06 -06:00
command.go caddyauth: handle CRLF and unterminated hash-password input (#8227) 2026-11-03 00:53:18 -05:00
command_test.go caddyauth: handle CRLF and unterminated hash-password input (#8227) 2026-11-03 00:53:18 -05:00