]> git.joonet.de Git - adminer.git/commitdiff
Elasticsearch: Support HTTPS by inputting https://server (bug #446)
authorJakub Vrana <jakub@vrana.cz>
Mon, 20 Feb 2017 17:06:14 +0000 (18:06 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 20 Feb 2017 17:06:14 +0000 (18:06 +0100)
adminer/drivers/elastic.inc.php
changes.txt

index 0b6d3ec8a6eec47311c171e01e34c797a9bf0fdd..c6398d48a327315804d01911d95fc9ce7cd87f29 100644 (file)
@@ -59,7 +59,8 @@ if (isset($_GET["elastic"])) {
                        }
 
                        function connect($server, $username, $password) {
-                               $this->_url = "http://$username:$password@$server/";
+                               preg_match('~^(https?://)?(.+)~', $server, $match);
+                               $this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]/";
                                $return = $this->query('');
                                if ($return) {
                                        $this->server_info = $return['version']['number'];
index 18ebbc6063bedfbed66455eded0a7ca625290e5c..dacdf68fa9833ac72b90334a9fe168f21983ecfe 100644 (file)
@@ -7,6 +7,7 @@ MySQL: Support spatial indexes
 PostgreSQL: Export
 PostgreSQL: Don't treat partial indexes as unique
 MS SQL: Support pdo_dblib
+Elasticsearch: Support HTTPS by inputting https://server
 
 Adminer 4.2.5 (released 2016-06-01):
 Fix remote execution in SQLite query