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

Work with a copy of request, vars in the event #2125

Merged
merged 7 commits into from
May 22, 2023

Conversation

sentrivana
Copy link
Contributor

@sentrivana sentrivana commented May 19, 2023

In some cases we were attaching parts of the original request to the event with live references on them and ending up modifying the underlying headers or request data when we scrubbed the event. Now we make sure to only attach a copy of the request to the event. We also do the same for frame vars.

See:

In some cases we were attaching parts of the original
request to the event with live references in them and
ending up modifying the underlying headers or request
data when we scrubbed the event. Now we make sure to
only attach a copy of the request to the event. We also
do the same for frame vars.
@sentrivana sentrivana marked this pull request as ready for review May 19, 2023 13:44
Copy link
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

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

need to do this in all of these

➜  sentry-python git:(master) rg 'event.*"request".*=' sentry_sdk
sentry_sdk/integrations/gcp.py
196:        event["request"] = request

sentry_sdk/integrations/asgi.py
214:        event["request"] = request_info

sentry_sdk/integrations/_wsgi_common.py
80:        event["request"] = request_info

sentry_sdk/integrations/aws_lambda.py
383:        sentry_event["request"] = request

sentry_sdk/integrations/fastapi.py
119:                        event["request"] = request_info

sentry_sdk/integrations/starlette.py
392:                            event["request"] = request_info
438:                            event["request"] = request_info

@sentrivana sentrivana merged commit 443b7b9 into master May 22, 2023
243 checks passed
@sentrivana sentrivana deleted the ivana/dont-modify-refs branch May 22, 2023 14:38
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.

None yet

2 participants