You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "jason (JIRA)" <ji...@apache.org> on 2014/04/22 09:19:16 UTC
[jira] [Updated] (FTPSERVER-456) Md5PasswordEncryptor
[ https://issues.apache.org/jira/browse/FTPSERVER-456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jason updated FTPSERVER-456:
----------------------------
Description:
Md5PasswordEncryptor
the password is endless loop
/**
* Hashes the password using MD5
*/
public String encrypt(String password) {
return EncryptUtils.encryptMD5(password);
}
/**
* {@inheritDoc}
*/
public boolean matches(String passwordToCheck, String storedPassword) {
if(storedPassword == null) {
throw new NullPointerException("storedPassword can not be null");
}
if(passwordToCheck == null) {
throw new NullPointerException("passwordToCheck can not be null");
}
return encrypt(passwordToCheck).equalsIgnoreCase(storedPassword);
}
was:
Md5PasswordEncryptor
the password is endless loop
> Md5PasswordEncryptor
> --------------------
>
> Key: FTPSERVER-456
> URL: https://issues.apache.org/jira/browse/FTPSERVER-456
> Project: FtpServer
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.6
> Reporter: jason
> Fix For: 1.0.6
>
>
> Md5PasswordEncryptor
> the password is endless loop
> /**
> * Hashes the password using MD5
> */
> public String encrypt(String password) {
> return EncryptUtils.encryptMD5(password);
> }
> /**
> * {@inheritDoc}
> */
> public boolean matches(String passwordToCheck, String storedPassword) {
> if(storedPassword == null) {
> throw new NullPointerException("storedPassword can not be null");
> }
> if(passwordToCheck == null) {
> throw new NullPointerException("passwordToCheck can not be null");
> }
>
> return encrypt(passwordToCheck).equalsIgnoreCase(storedPassword);
> }
--
This message was sent by Atlassian JIRA
(v6.2#6252)