Add strict locale-code-redirect config format check

This commit is contained in:
Dreeam 2024-05-29 23:20:34 +08:00
parent e79036d42f
commit 0d903d23b0
No known key found for this signature in database
GPG Key ID: 0998F8AFD8F667AB

View File

@ -58,7 +58,7 @@ public class I18NUtils {
for (String raw : settings.getProperty(PluginSettings.I18N_CODE_REDIRECT)) {
String[] split = raw.split(":");
if (locale.equalsIgnoreCase(split[0])) {
if (split.length == 2 && locale.equalsIgnoreCase(split[0])) {
return split[1];
}
}