Possible fix for autologin feature
Database management in a single PHP file
Brought to you by:
jakubvrana
Starting from version 4.7.2 of Adminer autologin feature does not work. It happens because the custom credentials() function never be called since the get_password() function in line 157 of auth.inc.php file returns an empty string before the call of credentials function:
if (isset($_GET["username"]) && is_string(get_password())) {
To fix this issue to this line also should be added call of the credentials function to check the password from it:
if (isset($_GET["username"]) && (is_string(get_password()) || is_string($adminer->credentials()[2]))) {
Thank you, this was the solution! I use adminer only inside a validated session, so it's save to not use the provided login function. It took me some time to find out how to use your hint. In the end it was clear that wasn't that difficult, but may be a starting help for someone else:
php compile.php editor mysql defor creating only the editor, only with mysql and only with german languageeditor-4.8.1-mysql-de.phpgets created in the same directory.