[
https://issues.apache.org/jira/browse/SHIRO-483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13882942#comment-13882942
]
Jared Bunting commented on SHIRO-483:
-------------------------------------
Digging through this a bit, I have found several unit tests that fail when the
default locale is set to Turkish, as well as a couple of other cases that
seemingly could fail with a Turkish Locale. Basically, anywhere that
{{String.toUpperCase()}} and {{String.toLowerCase()}} are used.
There is one piece of behavior that I'd be interested in getting some feedback
on.
{{WildcardPermission}} uses {{toLowerCase()}} to support case insensitivity.
The unit tests pertaining to this fail when the local is Turkish - but I'm not
sure if that should be considered expected behavior or not. The specific case
that fails is "something" and "SOMETHING". Arguably, if your locale is
Turkish, these are NOT the same. But man...that could get confusing.
("something" uppercases to "SOMETHİNG" and "SOMETHING" lowercases to
"somethıng")
> passwordsMatch() returns false with right plain password-encrypted password
> in JVM with default locale tr_TR
> ------------------------------------------------------------------------------------------------------------
>
> Key: SHIRO-483
> URL: https://issues.apache.org/jira/browse/SHIRO-483
> Project: Shiro
> Issue Type: Bug
> Components: Authentication (log-in)
> Affects Versions: 1.2.2
> Environment: JVM Locale tr_TR
> Reporter: Salih ERİKCİ
> Labels: password
> Fix For: 1.2.3
>
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> public static void main(String[] args) {
> PasswordService psd = new DefaultPasswordService();
> String password = "333";
> String enc = psd.encryptPassword(password);
> System.out.print(psd.passwordsMatch(password, enc));
>
> }
> The above code outputs "false" on JVM which has default locale tr_TR, the
> following outputs "true"
> public static void main(String[] args) {
> PasswordService psd = new DefaultPasswordService();
> String password = "333";
> String enc = psd.encryptPassword(password);
> Locale.setDefault(Locale.ENGLISH);
> System.out.print(psd.passwordsMatch(password, enc));
>
> }
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)