You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Javi (JIRA)" <ji...@apache.org> on 2009/01/20 02:10:59 UTC

[jira] Created: (FTPSERVER-267) DbUserManager not authenticating with MySQL 5.0.x

DbUserManager not authenticating with MySQL 5.0.x
-------------------------------------------------

                 Key: FTPSERVER-267
                 URL: https://issues.apache.org/jira/browse/FTPSERVER-267
             Project: FtpServer
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0.0-RC1
            Reporter: Javi
            Priority: Critical


DbUserManager does not set password, failing in the SQL:


[ INFO] 2009-01-20 01:47:48,322 [admin] [127.0.0.1] SELECT userid from FTP_USER WHERE userid='admin' AND userpassword=''

In order to get it running 2 changes needs to be done:

1- Configuration file modify 

<authenticate>SELECT userid from FTP_USER WHERE userid='{userid}' AND userpassword='{userpassword}'</authenticate>

Per this one:

<authenticate>SELECT userid, userpassword from FTP_USER WHERE userid='{userid}' AND userpassword='{userpassword}'</authenticate>

2- Modify DbUserManager.authenticate from:

                HashMap<String, Object> map = new HashMap<String, Object>();
                map.put(ATTR_LOGIN, escapeString(user));

To this one:

                HashMap<String, Object> map = new HashMap<String, Object>();
                map.put(ATTR_LOGIN, escapeString(user));
                map.put(ATTR_PASSWORD, getPasswordEncryptor().encrypt(password));

Notice bug https://issues.apache.org/jira/browse/FTPSERVER-105 is unfixed in 1.0.0-RC1 and need to add command "INSERT IGNORE" or MySQL won't run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FTPSERVER-267) DbUserManager not authenticating with MySQL 5.0.x

Posted by "David Latorre (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FTPSERVER-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665420#action_12665420 ] 

David Latorre commented on FTPSERVER-267:
-----------------------------------------

New bug report added to update ftpd-full.xml
 http://issues.apache.org/jira/browse/FTPSERVER-268



> DbUserManager not authenticating with MySQL 5.0.x
> -------------------------------------------------
>
>                 Key: FTPSERVER-267
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-267
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-RC1
>            Reporter: Javi
>            Priority: Critical
>         Attachments: DbUserManager.java.patch
>
>
> DbUserManager does not set password, failing in the SQL:
> [ INFO] 2009-01-20 01:47:48,322 [admin] [127.0.0.1] SELECT userid from FTP_USER WHERE userid='admin' AND userpassword=''
> In order to get it running 2 changes needs to be done:
> 1- Configuration file modify 
> <authenticate>SELECT userid from FTP_USER WHERE userid='{userid}' AND userpassword='{userpassword}'</authenticate>
> Per this one:
> <authenticate>SELECT userid, userpassword from FTP_USER WHERE userid='{userid}' AND userpassword='{userpassword}'</authenticate>
> 2- Modify DbUserManager.authenticate from:
>                 HashMap<String, Object> map = new HashMap<String, Object>();
>                 map.put(ATTR_LOGIN, escapeString(user));
> To this one:
>                 HashMap<String, Object> map = new HashMap<String, Object>();
>                 map.put(ATTR_LOGIN, escapeString(user));
>                 map.put(ATTR_PASSWORD, getPasswordEncryptor().encrypt(password));
> Notice bug https://issues.apache.org/jira/browse/FTPSERVER-105 is unfixed in 1.0.0-RC1 and need to add command "INSERT IGNORE" or MySQL won't run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FTPSERVER-267) DbUserManager not authenticating with MySQL 5.0.x

Posted by "David Latorre (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FTPSERVER-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Latorre closed FTPSERVER-267.
-----------------------------------

    Resolution: Invalid

> DbUserManager not authenticating with MySQL 5.0.x
> -------------------------------------------------
>
>                 Key: FTPSERVER-267
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-267
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-RC1
>            Reporter: Javi
>            Priority: Critical
>         Attachments: DbUserManager.java.patch
>
>
> DbUserManager does not set password, failing in the SQL:
> [ INFO] 2009-01-20 01:47:48,322 [admin] [127.0.0.1] SELECT userid from FTP_USER WHERE userid='admin' AND userpassword=''
> In order to get it running 2 changes needs to be done:
> 1- Configuration file modify 
> <authenticate>SELECT userid from FTP_USER WHERE userid='{userid}' AND userpassword='{userpassword}'</authenticate>
> Per this one:
> <authenticate>SELECT userid, userpassword from FTP_USER WHERE userid='{userid}' AND userpassword='{userpassword}'</authenticate>
> 2- Modify DbUserManager.authenticate from:
>                 HashMap<String, Object> map = new HashMap<String, Object>();
>                 map.put(ATTR_LOGIN, escapeString(user));
> To this one:
>                 HashMap<String, Object> map = new HashMap<String, Object>();
>                 map.put(ATTR_LOGIN, escapeString(user));
>                 map.put(ATTR_PASSWORD, getPasswordEncryptor().encrypt(password));
> Notice bug https://issues.apache.org/jira/browse/FTPSERVER-105 is unfixed in 1.0.0-RC1 and need to add command "INSERT IGNORE" or MySQL won't run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FTPSERVER-267) DbUserManager not authenticating with MySQL 5.0.x

Posted by "David Latorre (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FTPSERVER-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665415#action_12665415 ] 

David Latorre commented on FTPSERVER-267:
-----------------------------------------


The documented query string for the authentication statement is this one: 

<authenticate>SELECT userpassword from FTP_USER WHERE userid='{userid}'</authenticate>

It is available at : http://mina.apache.org/ftpserver/database-user-manager.html be we might need to check the project so sample XML files have this sentence.

If using that statement you do not need to change the  provided DBUserManager.

I'm opening a bug report for a "documentation improvement" and closing this one. Please feel free to open a new issue if this is not working for you.



> DbUserManager not authenticating with MySQL 5.0.x
> -------------------------------------------------
>
>                 Key: FTPSERVER-267
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-267
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-RC1
>            Reporter: Javi
>            Priority: Critical
>         Attachments: DbUserManager.java.patch
>
>
> DbUserManager does not set password, failing in the SQL:
> [ INFO] 2009-01-20 01:47:48,322 [admin] [127.0.0.1] SELECT userid from FTP_USER WHERE userid='admin' AND userpassword=''
> In order to get it running 2 changes needs to be done:
> 1- Configuration file modify 
> <authenticate>SELECT userid from FTP_USER WHERE userid='{userid}' AND userpassword='{userpassword}'</authenticate>
> Per this one:
> <authenticate>SELECT userid, userpassword from FTP_USER WHERE userid='{userid}' AND userpassword='{userpassword}'</authenticate>
> 2- Modify DbUserManager.authenticate from:
>                 HashMap<String, Object> map = new HashMap<String, Object>();
>                 map.put(ATTR_LOGIN, escapeString(user));
> To this one:
>                 HashMap<String, Object> map = new HashMap<String, Object>();
>                 map.put(ATTR_LOGIN, escapeString(user));
>                 map.put(ATTR_PASSWORD, getPasswordEncryptor().encrypt(password));
> Notice bug https://issues.apache.org/jira/browse/FTPSERVER-105 is unfixed in 1.0.0-RC1 and need to add command "INSERT IGNORE" or MySQL won't run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FTPSERVER-267) DbUserManager not authenticating with MySQL 5.0.x

Posted by "Javi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FTPSERVER-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Javi updated FTPSERVER-267:
---------------------------

    Attachment: DbUserManager.java.patch

Patch to 1.0.0-RC1

> DbUserManager not authenticating with MySQL 5.0.x
> -------------------------------------------------
>
>                 Key: FTPSERVER-267
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-267
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-RC1
>            Reporter: Javi
>            Priority: Critical
>         Attachments: DbUserManager.java.patch
>
>
> DbUserManager does not set password, failing in the SQL:
> [ INFO] 2009-01-20 01:47:48,322 [admin] [127.0.0.1] SELECT userid from FTP_USER WHERE userid='admin' AND userpassword=''
> In order to get it running 2 changes needs to be done:
> 1- Configuration file modify 
> <authenticate>SELECT userid from FTP_USER WHERE userid='{userid}' AND userpassword='{userpassword}'</authenticate>
> Per this one:
> <authenticate>SELECT userid, userpassword from FTP_USER WHERE userid='{userid}' AND userpassword='{userpassword}'</authenticate>
> 2- Modify DbUserManager.authenticate from:
>                 HashMap<String, Object> map = new HashMap<String, Object>();
>                 map.put(ATTR_LOGIN, escapeString(user));
> To this one:
>                 HashMap<String, Object> map = new HashMap<String, Object>();
>                 map.put(ATTR_LOGIN, escapeString(user));
>                 map.put(ATTR_PASSWORD, getPasswordEncryptor().encrypt(password));
> Notice bug https://issues.apache.org/jira/browse/FTPSERVER-105 is unfixed in 1.0.0-RC1 and need to add command "INSERT IGNORE" or MySQL won't run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.