-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Array type wrapper in QueryParamsSanitizer (#825)
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
- Loading branch information
Showing
4 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
bump: "patch" | ||
type: "fix" | ||
--- | ||
|
||
Fix sanitized values wrapped in Arrays. When a value like `[{ "foo" => "bar" }]` was sanitized it would be stored as `{ "foo" => "?" }`, omitting the parent value's Array square brackets. Now values will appear with the same structure as they were originally sanitized. This only applies to certain integrations like MongoDB, moped and ElasticSearch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters