You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Warning dialog http connection appears several times #4386
When http:// url is set on the login view, a dialog box appears warning us of a security breach. This dialog appears several times if we rotate the device, even if we have accepted a security vulnerability.
Expected behaviour
The dialog should only appear once after you have clicked continue button in the dialog.
Steps to reproduce
On the login screen, enter an HTTP server.
Once you have entered the server, you will see a dialog box informing you of the vulnerability.
Root cause — LoginActivity.getServerInfoIsSuccess() builds and show()s the insecure-HTTP AlertDialog inline whenever the server info is !isSecureConnection, with no "already accepted" guard:
On rotation the Activity is recreated and re-subscribes to authenticationViewModel.serverInfo. The UIResult.Success is re-emitted to the new observer (it's a retained value, not consumed), so getServerInfoIsSuccess runs again and re-builds the dialog.
Nothing records that the user already pressed Continue — onSaveInstanceState only persists authTokenType, not the HTTP-acceptance state.
Fix direction: persist an "insecure-HTTP accepted" flag (e.g. in onSaveInstanceState / the ViewModel) and skip the dialog when set; or gate it on the LiveData event being unconsumed rather than peeked. Either removes the re-show on config change.
Activity
jesmrec commentedon Apr 19, 2024
Kind of flow to be changed (as suggestion)
DeepDiver1975 commentedon Jun 30, 2026
Confirmed, still present on current
master.Root cause —
LoginActivity.getServerInfoIsSuccess()builds andshow()s the insecure-HTTPAlertDialoginline whenever the server info is!isSecureConnection, with no "already accepted" guard:authenticationViewModel.serverInfo. TheUIResult.Successis re-emitted to the new observer (it's a retained value, not consumed), sogetServerInfoIsSuccessruns again and re-builds the dialog.onSaveInstanceStateonly persistsauthTokenType, not the HTTP-acceptance state.Fix direction: persist an "insecure-HTTP accepted" flag (e.g. in
onSaveInstanceState/ the ViewModel) and skip the dialog when set; or gate it on the LiveData event being unconsumed rather than peeked. Either removes the re-show on config change.🤖 Generated with Claude Code
fix: keep insecure-HTTP warning dismissed across rotation