]> git.joonet.de Git - adminer.git/commitdiff
Disallow connecting to privileged ports (thanks to hyp3rlinx)
authorJakub Vrana <jakub@vrana.cz>
Tue, 16 Jan 2018 10:18:32 +0000 (11:18 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 16 Jan 2018 10:18:32 +0000 (11:18 +0100)
adminer/include/auth.inc.php
adminer/lang/cs.inc.php
changes.txt

index 7921bc5e2571de65107ac5b81ac3dd9198542118..944c929a0667d3c65064f0a0d39d293f65bd2d6b 100644 (file)
@@ -165,6 +165,10 @@ if (isset($_GET["username"])) {
                page_footer("auth");
                exit;
        }
+       list($host, $port) = explode(":", SERVER, 2);
+       if (is_numeric($port) && $port < 1024) {
+               auth_error('Connecting to privileged ports is not allowed.');
+       }
        check_invalid_login();
        $connection = connect();
 }
index 42ae281000a1d3f579e744cd6aae6f2d7f00982a..7944df8dbb80d0c08e7492a3f225579333818b91 100644 (file)
@@ -20,6 +20,7 @@ $translations = array(
        'If you did not send this request from Adminer then close this page.' => 'Pokud jste tento požadavek neposlali z Adminera, tak tuto stránku zavřete.',
        'No extension' => 'Žádné rozšíření',
        'None of the supported PHP extensions (%s) are available.' => 'Není dostupné žádné z podporovaných PHP rozšíření (%s).',
+       'Connecting to privileged ports is not allowed.' => 'Připojování k privilegovaným portům není povoleno.',
        'Session support must be enabled.' => 'Session proměnné musí být povolené.',
        'Session expired, please login again.' => 'Session vypršela, přihlašte se prosím znovu.',
        '%s version: %s through PHP extension %s' => 'Verze %s: %s přes PHP rozšíření %s',
index a2964d55747c9574aa3a57f606bffcfa453de517..8f728b92ceb36c71330ea8013b114db819707adc 100644 (file)
@@ -2,6 +2,7 @@ Adminer 4.4.0-dev:
 Add Content Security Policy
 Disallow scripts without nonce
 Rate limit password-less login attempts from the same IP address
+Disallow connecting to privileged ports
 Add nosniff header
 PHP 7.1: Prevent warning when using empty limit
 MySQL: Remove dedicated view for replication status (added in 4.3.0)