Skip to content

Commit

Permalink
code scanning changes for regex applied to fix security warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ahujaak committed Nov 5, 2024
1 parent 4277540 commit 27a2be5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/query_helper/sql_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def find_aliases
ColumnMap.new(
alias_name: sql_alias,
sql_expression: sql_expression.squish,
aggregate: /\b(array_agg|avg|bit_and|bit_or|bool_and|bool_or|boolor_agg|booland_agg|count|every|json_agg|jsonb_agg|json_object_agg|jsonb_object_agg|max|min|string_agg|sum|xmlagg)\((.*?)\)/.match?(sql_expression)
aggregate: /\b(array_agg|avg|bit_and|bit_or|bool_and|bool_or|boolor_agg|booland_agg|count|every|json_agg|jsonb_agg|json_object_agg|jsonb_object_agg|max|min|string_agg|sum|xmlagg)\((.*)\)/.match?(sql_expression)
) if sql_alias
end
column_maps.compact
Expand Down

0 comments on commit 27a2be5

Please sign in to comment.