Commit 75d38b7
committed
fix: validate locale cookie before setting I18n locale
Fixes I18n::InvalidLocale error when cookie contains invalid/empty locale.
Root cause: ApplicationController#set_locale was using the cookie value
directly without validation, causing failures when users had an empty
or invalid locale stored from previous sessions.1 parent cd866c3 commit 75d38b7
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
137 | 144 | | |
138 | 145 | | |
139 | 146 | | |
| |||
0 commit comments