You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
panic: message "simplified_explanation" not found in language "th" on missing translation keys #2070
When a client sends a request with an unhandled/partially supported language in the Accept-Language header (e.g., th-TH,th;q=0.9), Anubis panics when serving the challenge page due to missing translation keys in the go-i18n localizer. This results in a 502 Bad Gateway error for the client.
Instead of falling back gracefully to the default language (e.g., en), calling MustLocalize panics and crashes the request handler.
Steps to reproduce
Run the Anubis Docker container with default settings.
Send an HTTP request to the Anubis-protected endpoint with the HTTP header Accept-Language: th-TH,th;q=0.9 (or any locale where simplified_explanation is missing).
Observe the challenge page being triggered (issueChallenge).
The server panics with panic: message "simplified_explanation" not found in language "th" and returns a 502 Bad Gateway.
Expected behavior
When a requested language key or locale is missing, Anubis should fall back to the default language (English) or use Localize with proper error handling/fallback instead of calling MustLocalize which triggers a runtime panic.
Your operating system and its version.
iPhone OS 18_7 like Mac OS X
Your browser and its version.
AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6.1 Mobile/15E148 Safari/604.1
Additional context
Log Output / Stack Trace http: panic serving 172.18.0.6:48896: message "simplified_explanation" not found in language "th" goroutine 4963 [running]: net/http.(*conn).serve.func1() net/http/server.go:1939 +0xac panic({0x2529b18?, 0x7f62f72db0?}) runtime/panic.go:859 +0x120 github.com/nicksnyder/go-i18n/v2/i18n.(*Localizer).MustLocalize(0x2893388?, 0x7f62794270?) github.com/nicksnyder/go-i18n/v2@v2.6.1/i18n/localizer.go:235 +0x3c github.com/TecharoHQ/anubis/lib/localization.(*SimpleLocalizer).T(...) github.com/TecharoHQ/anubis/lib/localization/localization.go:121 ...
Submitted PR #2072 to address this. I'm not in a good place to test alternate languages, though, so if you could apply the patch and test in your env it would be appreciated. I think it is set up to do fallback as long as your browser says that english is allowed to be returned. If you see simplified_explanation when you expand the explanation tab during challenges then that might be the case, check what Accept-Language header your browser is sending.
Activity
dwhitemv25 commentedon Oct 25, 2026
Submitted PR #2072 to address this. I'm not in a good place to test alternate languages, though, so if you could apply the patch and test in your env it would be appreciated. I think it is set up to do fallback as long as your browser says that english is allowed to be returned. If you see
simplified_explanationwhen you expand the explanation tab during challenges then that might be the case, check what Accept-Language header your browser is sending.