You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an value sanitized by the QueryParamsSanitizer was an Array at the
root level, and `only_top_level = true` was set, it would not return a
sanitized Array object, only the child values.
The Array wrapper value would be removed, returning an inaccurate
picture of the structure of the sanitized value.
```ruby
# Before change
> Appsignal::Utils::QueryParamsSanitizer.sanitize(["foo" => "bar"], false)
# [{"foo"=>"?"}]
> Appsignal::Utils::QueryParamsSanitizer.sanitize(["foo" => "bar"], true)
# {"foo"=>"?"}
# After change
> Appsignal::Utils::QueryParamsSanitizer.sanitize(["foo" => "bar"], false)
# [{"foo"=>"?"}]
> Appsignal::Utils::QueryParamsSanitizer.sanitize(["foo" => "bar"], true)
# [{"foo"=>"?"}]
```
Part of #820
When an value sanitized by the QueryParamsSanitizer was an Array at the
root level, and `only_top_level = true` was set, it would not return a
sanitized Array object, only the child values.
The Array wrapper value would be removed, returning an inaccurate
picture of the structure of the sanitized value.
```ruby
# Before change
> Appsignal::Utils::QueryParamsSanitizer.sanitize(["foo" => "bar"], false)
# [{"foo"=>"?"}]
> Appsignal::Utils::QueryParamsSanitizer.sanitize(["foo" => "bar"], true)
# {"foo"=>"?"}
# After change
> Appsignal::Utils::QueryParamsSanitizer.sanitize(["foo" => "bar"], false)
# [{"foo"=>"?"}]
> Appsignal::Utils::QueryParamsSanitizer.sanitize(["foo" => "bar"], true)
# [{"foo"=>"?"}]
```
Part of #820
While we were working on #819 we noticed that the
QueryParamsSanitizer
sometimes returns a single object, when it was sanitizing an array.It happens on this line:
appsignal-ruby/lib/appsignal/utils/query_params_sanitizer.rb
Line 38 in 3f503ad
To do
only_top_level
totrue
The text was updated successfully, but these errors were encountered: