]> git.joonet.de Git - adminer.git/commitdiff
Disable redirections in HTTP based drivers
authorPeter Knut <peter@pematon.com>
Thu, 25 Jan 2024 12:43:18 +0000 (13:43 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sun, 16 Feb 2025 17:03:17 +0000 (18:03 +0100)
adminer/drivers/elastic.inc.php
plugins/drivers/clickhouse.php
plugins/drivers/simpledb.php

index 799f6d0b311d080098c5df5d7fde43e746d9e314..fe33c315eb0371876f4840079be1a5570c159826 100644 (file)
@@ -21,6 +21,8 @@ if (isset($_GET["elastic"])) {
                                        'content' => $content === null ? $content : json_encode($content),
                                        'header' => 'Content-Type: application/json',
                                        'ignore_errors' => 1, // available since PHP 5.2.10
+                                       'follow_location' => 0,
+                                       'max_redirects' => 0,
                                ))));
                                if (!$file) {
                                        $this->error = $php_errormsg;
index 60bb0b45e9578602523dea499cbf0785a51ef09b..86f3464d3a93052a737a84484e5e6225ffd84d95 100644 (file)
@@ -15,6 +15,8 @@ if (isset($_GET["clickhouse"])) {
                                'content' => $this->isQuerySelectLike($query) ? "$query FORMAT JSONCompact" : $query,
                                'header' => 'Content-type: application/x-www-form-urlencoded',
                                'ignore_errors' => 1, // available since PHP 5.2.10
+                               'follow_location' => 0,
+                               'max_redirects' => 0,
                        ))));
 
                        if ($file === false) {
index 9fafe884087520d5501125d26a870713fd069355..226625f143d8ef4d0d3e21c42c684238d18ba80e 100644 (file)
@@ -426,6 +426,8 @@ if (isset($_GET["simpledb"])) {
                        'method' => 'POST', // may not fit in URL with GET
                        'content' => $query,
                        'ignore_errors' => 1, // available since PHP 5.2.10
+                       'follow_location' => 0,
+                       'max_redirects' => 0,
                ))));
                if (!$file) {
                        $connection->error = $php_errormsg;