Skip to content

Commit

Permalink
Fix Sql injection vulnurability
Browse files Browse the repository at this point in the history
  • Loading branch information
Matlefebvre1234 committed Jul 10, 2024
1 parent e638ee4 commit b856df8
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 151 deletions.
4 changes: 2 additions & 2 deletions src/clickhouse/makeQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export async function makeQuery<T = unknown>(query: string, query_params: ValidQ
const data: ResponseJSON<T> = await response.json();

prometheus.query.inc();
if ( data.statistics ) {
if (data.statistics) {
prometheus.bytes_read.inc(data.statistics.bytes_read);
prometheus.rows_read.inc(data.statistics.rows_read);
prometheus.elapsed.inc(data.statistics.elapsed);
}

logger.trace({ statistics: data.statistics, rows: data.rows, rows_before_limit_at_least: data.rows_before_limit_at_least });

return data;
}
Loading

0 comments on commit b856df8

Please sign in to comment.