mirror of
https://github.com/vrana/adminer.git
synced 2026-04-14 00:18:09 +02:00
Don't allow path in HTTP servers
This commit is contained in:
@@ -248,7 +248,10 @@ if (isset($_GET["simpledb"])) {
|
||||
|
||||
function connect() {
|
||||
global $adminer;
|
||||
list(, , $password) = $adminer->credentials();
|
||||
list($host, , $password) = $adminer->credentials();
|
||||
if (!preg_match('~^(https?://)?[-a-z\d.]+(:\d+)?$~', $host)) {
|
||||
return lang('Invalid server.');
|
||||
}
|
||||
if ($password != "") {
|
||||
return lang('Database does not support password.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user