Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obey safe repr for exceptions #91

Merged
merged 7 commits into from
Feb 22, 2016

Conversation

sibson
Copy link
Contributor

@sibson sibson commented Feb 15, 2016

Exceptions may contain sensitive information in args, thus _transform() should be used rather than str() to ensure safe_repr, and scrub_fields settings are honoured.

@jfarrimo
Copy link
Contributor

Seems reasonable to me.

jfarrimo added a commit that referenced this pull request Feb 22, 2016
@jfarrimo jfarrimo merged commit 30d574e into rollbar:master Feb 22, 2016
@brianr
Copy link
Member

brianr commented Feb 23, 2016

Thanks @sibson !

@@ -864,7 +864,7 @@ def _add_locals_data(data, exc_info):
# Fill in all of the named args
for named_arg in named_args:
if named_arg in local_vars:
args.append(local_vars[named_arg])
args.append(_transform(local_vars[named_arg], key=(named_arg,)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this happen as part of the _serialize_frame_data() call below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, at that point you've lost the important context that the arg was password and only have the content left, which is insufficient for scrubbing. eg https://github.com/rollbar/pyrollbar/pull/91/files#diff-d7fa735556b7ff27de68295083f733d4R754.

I've been experimenting with an alternate solution that may be "cleaner" but has a larger impact on how rollbar is capturing and presenting data, https://github.com/rollbar/pyrollbar/pull/91/files#diff-d7fa735556b7ff27de68295083f733d4R754. I can PR against this repo if you'd like to have more discussion around it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be great. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jfarrimo pushed a commit that referenced this pull request Mar 1, 2016
This reverts a pull request we accepted and merged recently
(#91).  It turns out that that
request causes excpetion messages to not be passed along as expected,
and that isn't desired behaviour.  We're going to attack this problem
again soon and come up with a solution that meets the needs of the
reverted pull request without causing the undesired side effects.
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.

4 participants