-
Notifications
You must be signed in to change notification settings - Fork 333
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
Conversation
* | ||
* Becomes: | ||
* @code | ||
* "fb123456789://authorize#access_token=((redacted/fb-auth-token))" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ([^ ]
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it - sounds good 👍
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. |
Good point. What is the risk of adding this ? |
I just realized there is logging already - https://github.com/segmentio/analytics-ios/pull/798/files#diff-ecadcecb2e3287f62402c496069b01a2R85. This looks reasonable to me! |
Codecov Report
@@ 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 |
Ref: LIB-686
Ref: LIB-686