Forbid protocol and port number in server for Elastisearch driver
This commit is contained in:
parent
133c53f24a
commit
b3ebf738aa
|
@ -227,6 +227,9 @@ if (isset($_GET["elastic"])) {
|
||||||
global $adminer;
|
global $adminer;
|
||||||
$connection = new Min_DB;
|
$connection = new Min_DB;
|
||||||
list($server, $username, $password) = $adminer->credentials();
|
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, "")) {
|
if ($password != "" && $connection->connect($server, $username, "")) {
|
||||||
return lang('Database does not support password.');
|
return lang('Database does not support password.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue