Forbid protocol and port number in server for Elastisearch driver
This commit is contained in:
parent
133c53f24a
commit
b3ebf738aa
1 changed files with 3 additions and 0 deletions
|
@ -227,6 +227,9 @@ if (isset($_GET["elastic"])) {
|
|||
global $adminer;
|
||||
$connection = new Min_DB;
|
||||
list($server, $username, $password) = $adminer->credentials();
|
||||
if (strpos($server, '/') !== false || strpos($server, ':') !== false) {
|
||||
return lang('Only hostname or IP address');
|
||||
}
|
||||
if ($password != "" && $connection->connect($server, $username, "")) {
|
||||
return lang('Database does not support password.');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue