rollbar-php
rollbar-php copied to clipboard
`scrubFields` config doesn't support paths (e.g. request.session.myKey)?
Surely I must be doing something wrong, but it seems like scrubFields
doesn't properly deal with paths (e.g. request.session.myKey
).
I'm using v1.8.1 and have checked what happens in Scrubber::scrubArray:114
. $fields
is the scrubFields
array from the configuration literal, which includes paths (e.g. request.session.myKey
). $key
, on the other hand, is always only the last part (e.g. myKey
).
It looks like the code should check isset($fields[strtolower($current)])
as well as isset($fields[strtolower($key)])
maybe?
As an example:
Rollbar::init([
'scrubFields' => [
'request.session.myKey'
]
]);
Does not scrub myKey
, while
Rollbar::init([
'scrubFields' => [
'myKey'
]
]);
does.
The documentation actually lists a couple of path values in the defaults (e.g. request.session.csrf_
), so I fully expect this to work.
Bump! Have same problem. For example i want to scrub request.body
. Because when I send payload as json string, it is not scrubbed. When i set body
or request
in scrubFields
api calls fails.