Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200
Thanks to Adam Crosser and Brian Sizemore
This commit is contained in:
parent
1e1c46ac72
commit
ccd2374b0b
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue