Skip to content

Conversation

@vojtech-dobes
Copy link
Contributor

  • bug fix
  • BC break? no

We are using Tracy support for scrubbing to remove passwords etc. from our Tracy bluescreen files. But we've found that in following part of stacktrace (in Elasticsearch\Transport from official Elasticsearch SDK), password remained:

connectionParams: array
    'client' => array
        'x-elastic-client-meta' => true
        'curl' => array
            107 => 1
            10005 => 'actualHostHere:actualPasswordHere'

It's because Describer doesn't apply scrubber on non-string keys. This PR argues that they have to be for sanity checked as well. I've chosen the path of not changing Scrubber signature, so I cast scalar keys to strings and pass empty string for non scalar keys. To be honest I am not sure whether such eventuality is possible (I was thinking about WeakMap and stuff like that, but not sure if it would make its way there).

@vojtech-dobes
Copy link
Contributor Author

@dg Is there something I can do to make this acceptable change? I can imagine the issue is that this makes the scrubber signature somewhat less clearly defined?

@dg dg changed the title Dumper: check also non-string keys for sensitivity Dumper: scrubber checks also non-string keys Apr 21, 2021
@dg dg merged commit bbc27d0 into nette:master Apr 21, 2021
@dg
Copy link
Member

dg commented Apr 21, 2021

Thanks

dg pushed a commit that referenced this pull request Apr 21, 2021
@vojtech-dobes
Copy link
Contributor Author

Thank you

@vojtech-dobes vojtech-dobes deleted the scrub-non-string-keys branch April 21, 2021 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants