opentelemetry-ruby-contrib icon indicating copy to clipboard operation
opentelemetry-ruby-contrib copied to clipboard

fix!: Return message when sql is over the obfuscation limit

Open kaylareopelle opened this issue 1 year ago • 1 comments

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

kaylareopelle avatar Sep 04 '24 23:09 kaylareopelle

Ready?

arielvalentin avatar Sep 07 '24 19:09 arielvalentin

Whoops, yes, @arielvalentin! Opened now.

kaylareopelle avatar Sep 09 '24 16:09 kaylareopelle

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.

arielvalentin avatar Sep 09 '24 16:09 arielvalentin