You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lécharny (Jira)" <ji...@apache.org> on 2023/06/29 21:31:00 UTC

[jira] [Closed] (FTPSERVER-456) Md5PasswordEncryptor

     [ https://issues.apache.org/jira/browse/FTPSERVER-456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lécharny closed FTPSERVER-456.
---------------------------------------

> 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
>            Priority: Major
>             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
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org