-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix(auth): mitigate tapjacking on the auth activity window #2416
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
base: version-10.0.0-beta04
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,6 +77,7 @@ class FirebaseAuthActivity : ComponentActivity() { | |
|
|
||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| super.onCreate(savedInstanceState) | ||
| window.decorView.filterTouchesWhenObscured = true | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FirebaseAuthActivityTest.kt already has a Robolectric harness for this activity. Worth adding a small test asserting filterTouchesWhenObscured is true after onCreate so this can't silently regress.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added in 850d011 — new Robolectric test asserting filterTouchesWhenObscured is true on the activity window after onCreate. |
||
| enableEdgeToEdge() | ||
|
|
||
| // Extract configuration and auth instance from cache using UUID key | ||
|
|
||
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.
This covers the activity's own window, but the Compose Dialogs in this module (e.g. ReauthenticationDialog for password re-entry) create their own separate native Window that this flag doesn't propagate to. Could you also set filterTouchesWhenObscured on those dialog windows, or note in the description that they're out of scope for this fix?
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.
Fixed in 850d011 — added filterTouchesWhenObscured to both ReauthenticationDialog and ErrorRecoveryDialog via a SideEffect that sets the flag on the dialog's root view.