]> git.joonet.de Git - adminer.git/commitdiff
Do not attempt logging in without password (bug #676)
authorJakub Vrana <jakub@vrana.cz>
Tue, 14 May 2019 07:07:51 +0000 (09:07 +0200)
committerJakub Vrana <jakub@vrana.cz>
Tue, 14 May 2019 07:07:51 +0000 (09:07 +0200)
adminer/include/auth.inc.php
adminer/include/functions.inc.php
changes.txt

index fef6b62902b05063a133436be035d413ce4b3457..f8a5a3993cea4bc29cbad9c1ba585302c2909e27 100644 (file)
@@ -160,7 +160,7 @@ if (isset($_GET["username"]) && !class_exists("Min_DB")) {
 
 stop_session(true);
 
-if (isset($_GET["username"])) {
+if (isset($_GET["username"]) && is_string(get_password())) {
        list($host, $port) = explode(":", SERVER, 2);
        if (is_numeric($port) && $port < 1024) {
                auth_error(lang('Connecting to privileged ports is not allowed.'));
index 02fa0e523487b69ed9516030e2565c6cd7212ab9..d208e0b2a69ef3299c414b046e3fc80bafe2a305 100644 (file)
@@ -351,7 +351,7 @@ function set_password($vendor, $server, $username, $password) {
 }
 
 /** Get password from session
-* @return string
+* @return string or null for missing password or false for expired password
 */
 function get_password() {
        $return = get_session("pwds");
index 81034969eff4bbfeb4165bf68183bbbb2301d56c..ff511b6d30029eaef940bbe226cb4352f0dc4b71 100644 (file)
@@ -1,4 +1,5 @@
 Adminer 4.7.2-dev:
+Do not attempt logging in without password (bug #676)
 MySQL: Fix creating users and changing password in MySQL 8 (bug #663)
 
 Adminer 4.7.1 (released 2019-01-24):