1 Commits
Author SHA1 Message Date
Abdellatif Anaflous f7d58438b0 admin: fix host allow-list comparison to be case-insensitive (#7993)
The admin host check compared r.Host against the allowed URL's Host
with byte-for-byte equality. url.Parse does not normalize host case,
so an allowed 'http://Example.com:2019' rejected a client Host of
'example.com:2019' with 'host not allowed', and the same happened for
an uppercase variant of a lowercase entry like localhost.

The Origin check got this treatment in 7973 already, the DNS rebinding
Host check right next to it did not. Both read the same allowedOrigins
list, so this applies the same strings.EqualFold treatment there.

Regression test covers both fold directions, the default localhost
entry and the negative case that must keep failing
2026-09-05 12:39:37 +00:00