#19 Login problem

2.2.1
closed-works-for-me
Jakub Vrána
Common (150)
5
2009-11-06
2009-10-22
Sean Toman
No

I downloaded editor 2.2.0.php and run it thru the web browser. When I entered my database username and password, it returns with

Access denied for user 'ODBC'@'localhost' (using password: NO)

Is the code in v2.2.0 ignoring the entered database username and trying to use the default username 'ODBC'?
Is this a bug?

I tried hardcoding the username and password using the following extension

function credentials() {
// ODBC user without password on localhost
return array('localhost', 'root', 'XXXXXXX');
}

That worked but the password is hard-coded.

Thanks in advance for any help.
Sean

Discussion

  • Jakub Vrána
    Jakub Vrána
    2009-10-22

    It is not a bug, it's a feature clearly stated at http://www.adminer.org/en/editor/ - "Separate set of login credentials different from the real database user and password".

    The reasoning is that a Editor user should not know the real database credentials because Editor can limit his actions.

    You can however use the Adminer implementation of credentials() to use the entered data to connect:

    return array($_GET["server"], $_SESSION["usernames"][$_GET["server"]], $_SESSION["passwords"][$_GET["server"]]);

     
  • Jakub Vrána
    Jakub Vrána
    2009-10-22

    • status: open --> closed
     
  • Jakub Vrána
    Jakub Vrána
    2009-11-06

    • status: closed --> closed-works-for-me