-
Notifications
You must be signed in to change notification settings - Fork 33
[MOB - 3703] - Sensitive log information #400
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
Conversation
1. Additional check to see if the App is debuggable. If so, only then -> consider config.logLevel or else, stick with default -> or anything above Warning level
Codecov Report
@@ Coverage Diff @@
## master #400 +/- ##
==========================================
- Coverage 67.35% 67.30% -0.05%
==========================================
Files 63 63
Lines 3795 3802 +7
Branches 439 440 +1
==========================================
+ Hits 2556 2559 +3
- Misses 981 982 +1
- Partials 258 261 +3
Continue to review full report at Codecov.
|
5ce9a74 to
9fe905d
Compare
9fe905d to
121694a
Compare
iterableapi/src/main/java/com/iterable/iterableapi/IterableRequestTask.java
Show resolved
Hide resolved
| } | ||
|
|
||
| private static boolean isLoggable(int messageLevel) { | ||
| boolean isDebug = ((IterableApi.getInstance().getMainActivityContext().getApplicationInfo().flags & IterableApi.getInstance().getMainActivityContext().getApplicationInfo().FLAG_DEBUGGABLE) != 0); |
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.
Not needed for approval, should isDebug be split out as a universal utility function?
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.
In fact we do have a global state in IterableAPI class which is referred in IterableLogger. However, I dont see setDebugMode called anywhere in the code.
iterable-android-sdk/iterableapi/src/main/java/com/iterable/iterableapi/IterableApi.java
Line 183 in 788e949
| void setDebugMode(boolean debugMode) { |
This PR will add explicit check. But will give it a look if it can be optimized 👍
Added checks to omit Auth key and API key before logging
121694a to
09302b2
Compare
🔹 Jira Ticket(s) if any
(https://iterable.atlassian.net/browse/MOB-XXXX)](https://iterable.atlassian.net/browse/MOB-3703)
✏️ Description