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

fix(pii): prevent ip derivation if already scrubbed before #4491

Merged
merged 10 commits into from
Feb 12, 2025

Conversation

Litarnus
Copy link
Contributor

This PR adds remarks if the user IP was PII scrubbed to prevent assuming that empty IP means {{auto}} for certain platforms.

fix #4480

@Litarnus Litarnus self-assigned this Feb 10, 2025
@Litarnus Litarnus marked this pull request as ready for review February 11, 2025 08:20
@Litarnus Litarnus requested a review from a team as a code owner February 11, 2025 08:20
Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

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

We should have a test case for this, maybe an integration test using relay_chain?

.any(|r| r.ty == RemarkType::Removed);
if !scrubbed_before {
// In an ideal world all SDKs would set {{auto}} explicitly.
if let Some("javascript") | Some("cocoa") | Some("objc") = platform {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think I've ever seen if let used with this sort of pattern before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Me neither, but I like its expressiveness

@Litarnus Litarnus merged commit bb90af7 into master Feb 12, 2025
25 checks passed
@Litarnus Litarnus deleted the martinl/pii-scrub-fix branch February 12, 2025 09:31
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.

Can't scrub user ip address when platform is javascript
4 participants