mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14:07 +02:00
Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200
Thanks to Adam Crosser and Brian Sizemore
This commit is contained in:
@@ -22,7 +22,7 @@ if (isset($_GET["clickhouse"])) {
|
||||
return $file;
|
||||
}
|
||||
if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) {
|
||||
$this->error = $file;
|
||||
$this->error = lang('Invalid credentials.') . " $http_response_header[0]";
|
||||
return false;
|
||||
}
|
||||
$return = json_decode($file, true);
|
||||
|
@@ -28,7 +28,7 @@ if (isset($_GET["elastic"])) {
|
||||
return $file;
|
||||
}
|
||||
if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) {
|
||||
$this->error = $file;
|
||||
$this->error = lang('Invalid credentials.') . " $http_response_header[0]";
|
||||
return false;
|
||||
}
|
||||
$return = json_decode($file, true);
|
||||
|
@@ -1,4 +1,5 @@
|
||||
Adminer 4.7.9-dev:
|
||||
Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200
|
||||
Re-enable PHP warnings (regression from 4.7.8)
|
||||
|
||||
Adminer 4.7.8 (released 2020-12-06):
|
||||
|
Reference in New Issue
Block a user