-
-
Notifications
You must be signed in to change notification settings - Fork 45
Register broadcast receivers with proper security #2983
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
… is >= Tiramisu. Removed auto SMS code retrieval from deactivation OTP page (user must type it manually).
📝 WalkthroughWalkthroughThis pull request introduces two sets of changes within the CommCare app. In the ConnectIdPhoneVerificationFragment, the condition for registering the SMS broadcast receiver has been updated. Instead of checking for Android O and above, the fragment now applies the Sequence Diagram(s)sequenceDiagram
participant F as ConnectIdPhoneVerificationFragment
participant A as Android System
F->>A: Check Android API version during registerBrodcastReciever()
alt API >= TIRAMISU (33)
F->>A: Register smsBroadcastReceiver with RECEIVER_NOT_EXPORTED flag
else API < TIRAMISU
F->>A: Register smsBroadcastReceiver without additional flag
end
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
https://dimagi.atlassian.net/browse/CCCT-840
cross-request: dimagi/commcare-core#1455
Technical Summary
This PR fixes a crash experienced on some Android versions when the user attempts to deactivate their account. The issue is described more here, and the fix is to simply check the Android version when registering a receiver and pass in the RECEIVER_NOT_EXPORTED flag if necessary.
Feature Flag
ConnectID
Safety Assurance
Safety story
I found other places in existing code that perform the check on Tiramisu and call the registerReceiver function differently depending.
Automated test coverage
No automated tests for ConnectID yet.
QA Plan
Attempt to deactivate a ConnectID account (already covered in the test plan), using a device running Android Tiramisu or newer.
Labels and Review