Skip to content

Commit

Permalink
Improve check for numeric ports (bug #769)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Dec 6, 2020
1 parent e0a3205 commit 35bfaa7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion adminer/include/auth.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function auth_error($error) {

if (isset($_GET["username"]) && is_string(get_password())) {
list($host, $port) = explode(":", SERVER, 2);
if (is_numeric($port) && ($port < 1024 || $port > 65535)) {
if (+$port && ($port < 1024 || $port > 65535)) {
auth_error(lang('Connecting to privileged ports is not allowed.'));
}
check_invalid_login();
Expand Down
1 change: 1 addition & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Adminer 4.7.8-dev:
Support PHP 8
Disallow connecting to privileged ports (bug #769)

Adminer 4.7.7 (released 2020-05-11):
Fix open redirect if Adminer is accessible at //adminer.php%2F@
Expand Down

0 comments on commit 35bfaa7

Please sign in to comment.