Medium firefox Logic Error 🔧 Commit mapped

Overview

Medium
Severity
CVSS
No
Exploited ITW
Fixed
Fix Status
Impactmoderate
DescriptionWhen switching between Android apps using the card carousel Firefox shows a black screen as its card image when a password-related screen was the last one being used. Prior to Firefox 144 the password edit screen was visible.
ComponentCore
Bug ClassLogic Error
Tracker1872601
Fix commit290fc9466ac0 (firefox) +9/-0
CISA KEVNot listed
Creditedmsd
Disclosed2025-10-14

Changed Functions

FunctionChangeNotes
if
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/logins/ui/SavedLoginsScreen.kt
modified

Files Changed

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/logins/ui/SavedLoginsScreen.kt
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/logins/ui/SavedLoginsScreen.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/logins/ui/SavedLoginsScreen.kt
index e478b3d4fa2..14ac73a9c47 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/logins/ui/SavedLoginsScreen.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/logins/ui/SavedLoginsScreen.kt
@@ -4,7 +4,10 @@
 
 package org.mozilla.fenix.settings.logins.ui
 
+import android.view.WindowManager
+import androidx.activity.ComponentActivity
 import androidx.activity.compose.BackHandler
+import androidx.activity.compose.LocalActivity
 import androidx.compose.foundation.background
 import androidx.compose.foundation.clickable
 import androidx.compose.foundation.layout.Arrangement
@@ -81,6 +84,7 @@ internal fun SavedLoginsScreen(
     buildStore: (NavHostController) -> LoginsStore,
     startDestination: String = LoginsDestinations.LIST,
 ) {
+    val activityContext = LocalActivity.current as ComponentActivity
     val navController = rememberNavController()
     val store = buildStore(navController)
 
@@ -88,6 +92,8 @@ internal fun SavedLoginsScreen(
         val observer = object : DefaultLifecycleObserver {
             override fun onPause(owner: LifecycleOwner) {
                 super.onPause(owner)
+                activityContext.window?.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
+
                 if (store.state.pinVerificationState != PinVerificationState.Started) {
                     store.dispatch(BiometricAuthenticationAction.AuthenticationFailed)
                     store.dispatch(BiometricAuthenticationDialogAction(false))
@@ -98,6 +104,8 @@ internal fun SavedLoginsScreen(
 
             override fun onResume(owner: LifecycleOwner) {
                 super.onResume(owner)
+                activityContext.window?.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
+
                 val noPinVerification =
                     store.state.pinVerificationState == PinVerificationState.Inert
                 val pinVerificationDuplicated =
@@ -112,6 +120,7 @@ internal fun SavedLoginsScreen(
         ProcessLifecycleOwner.get().lifecycle.addObserver(observer)
 
         onDispose {
+            activityContext.window?.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
             store.dispatch(ViewDisposed)
             ProcessLifecycleOwner.get().lifecycle.removeObserver(observer)
         }
Loading diff…