Skip to content
Permalink
Browse files Browse the repository at this point in the history
Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200
Thanks to Adam Crosser and Brian Sizemore
  • Loading branch information
vrana committed Feb 6, 2021
1 parent 1e1c46a commit ccd2374
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adminer/drivers/clickhouse.inc.php
Expand Up @@ -22,7 +22,7 @@ function rootQuery($db, $query) {
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);
Expand Down
2 changes: 1 addition & 1 deletion adminer/drivers/elastic.inc.php
Expand Up @@ -28,7 +28,7 @@ function rootQuery($path, $content = array(), $method = 'GET') {
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);
Expand Down
1 change: 1 addition & 0 deletions changes.txt
@@ -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):
Expand Down

1 comment on commit ccd2374

@vrana
Copy link
Owner Author

@vrana vrana commented on ccd2374 Feb 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.