opentelemetry-ruby-contrib
opentelemetry-ruby-contrib copied to clipboard
fix!: Return message when sql is over the obfuscation limit
When SQL queries had prepended comments and were over the configured obfuscation limit, the query would fail to obfuscate and sensitive data could be exposed.
The previous approach was incompatible because the first index with a match would be the zero index, so the range would return the entire SQL string and append the truncation message to the end of it.
Until we can find a way to make the first match approach work with prepended queries, let's return a message stating the query was over the limit.
Resolves #1146
Ready?
Whoops, yes, @arielvalentin! Opened now.
cc: @reid-rigo Making you aware that we are reverting this functionality.
We will be looking to restore it in the near future, but we have identified an issue with sanitizing SQL queries that prepend comments, so we have to revert it now.