shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "an wolf (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SHIRO-324) HashedCredentialsMatcher getCredentials() bug
Date Tue, 27 Sep 2011 09:22:11 GMT
HashedCredentialsMatcher getCredentials() bug
---------------------------------------------

                 Key: SHIRO-324
                 URL: https://issues.apache.org/jira/browse/SHIRO-324
             Project: Shiro
          Issue Type: Bug
          Components: Authentication (log-in), Cryptography & Hashing
    Affects Versions: 1.1.0
         Environment: irrelevant
            Reporter: an wolf


// isStoredCredentialsHexEncoded() always returns true, no matter if I store a hex or a base64
password or credential. Hex is Base16. Authentication fails if I store Base64 and don't move
it to Hex before here with an IllegalArgumentException because Hex.decode(...) doesn't recognize
but the 0..9 and a..f I think
//account.credentials were a char[] or String, so
            //we need to do text decoding first:
            if (isStoredCredentialsHexEncoded()) {
                storedBytes = Hex.decode(storedBytes);
            } else {
                storedBytes = Base64.decode(storedBytes);
            }

...
from my ini:
# password hashing specification
sha256Matcher = org.apache.shiro.authc.credential.HashedCredentialsMatcher
sha256Matcher.hashAlgorithmName=SHA-256

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message