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

Add deep links redaction #798

Merged
merged 9 commits into from
Nov 15, 2018
Merged

Add deep links redaction #798

merged 9 commits into from
Nov 15, 2018

Conversation

fathyb
Copy link
Contributor

@fathyb fathyb commented Nov 14, 2018

Ref: LIB-686

@fathyb fathyb merged commit d1db92d into master Nov 15, 2018
@fathyb fathyb deleted the feat/deep-links-redaction branch November 15, 2018 19:47
fathyb added a commit that referenced this pull request Nov 15, 2018
*
* Becomes:
* @code
* "fb123456789://authorize#access_token=((redacted/fb-auth-token))"
Copy link
Contributor

Choose a reason for hiding this comment

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

given the example fb123456789://authorize#access_token=secretsecretsecretsecret&some=data, wouldn't the desired output be fb123456789://authorize#access_token=((redacted/fb-auth-token))&some=data? (i.e. &some=data at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Facebook sends other private query parameters to the deep link that could be considered sensible, so we remove everything until we get a space ([^ ]).

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it - sounds good 👍

@f2prateek
Copy link
Contributor

Not a blocker, but we should consider instrument logging around when information is replaced with this mechanism. Otherwise folks may be confused about this behaviour.

@gerhard-segment
Copy link

Good point.

What is the risk of adding this ?

@f2prateek
Copy link
Contributor

I just realized there is logging already - https://github.com/segmentio/analytics-ios/pull/798/files#diff-ecadcecb2e3287f62402c496069b01a2R85. This looks reasonable to me!

@codecov-io
Copy link

Codecov Report

Merging #798 into master will increase coverage by 0.84%.
The diff coverage is 96.11%.

@@            Coverage Diff            @@
##           master    #798      +/-   ##
=========================================
+ Coverage   85.66%   86.5%   +0.84%     
=========================================
  Files          52      52              
  Lines        2671    2772     +101     
=========================================
+ Hits         2288    2398     +110     
+ Misses        383     374       -9

Serheo pushed a commit to fubotv/analytics-ios that referenced this pull request Aug 15, 2019
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.

6 participants