PhoenixKit 2.37.5: No more redirect loop on non-Latin addresses
PhoenixKit 2.37.5 fixes addresses whose first part is written in a non-Latin script, such as /дордол. The browser was redirected to the same address again and again until it gave up.
The language redirects compared the encoded address with the decoded language code, found nothing to replace, and redirected to the address unchanged. All three language redirects now replace the segment right after the PhoenixKit prefix, never redirect to an unchanged address, and keep the query string. A crafted language segment that would lead to an unsafe address, such as //evil.com-x, now renders in the default language instead of causing a server error.
A dialect address that cannot be redirected now keeps its language only if that language is enabled on the site. Before, an unknown or disabled code like zz or fr was used as given.
Full release notes: PhoenixKit 2.37.5
2.37.5 · 23 September 2026
Fixed
- A non-ASCII first path segment no longer loops the browser forever
(#861, fixes #849).
/дордолand similar URLs got a redirect back to the same URL: the locale redirects searched the percent-encoded request path for the decoded locale, found nothing, and redirected to the path unchanged. All three locale redirects (invalid locale, full dialect → base, default locale → clean URL) now swap the segment right after the mount prefix, never redirect to an unchanged path, and keep the query string. A crafted dialect segment that would build an unsafe target (//evil.com-x, a backslash, a control character) now renders under the default locale instead of raising a 500. - A dialect URL that can’t be redirected keeps its language only if that
language is enabled (#861 review). Such a request rendered under any
base the URL named, including an unknown
zzor a disabledfr. It now keeps the base only if it is a predefined, enabled language, the same rule a bare/fr/...URL follows, and otherwise uses the default.
PhoenixKit 2.37.5. Install or update: {:phoenix_kit, "~> 2.37"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.