Skip to content

[BUG] Warning dialog http connection appears several times #4386

Open

Description

@Aitorbp

Actual behaviour

  • 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

  1. On the login screen, enter an HTTP server.
  2. Once you have entered the server, you will see a dialog box informing you of the vulnerability.
  3. Click continue button.
  4. Rotate the device.
  5. The dialog box will reappear.

Activity

  1. jesmrec commented on Apr 19, 2024

    @jesmrec
    Member

    Kind of flow to be changed (as suggestion)

  2. added this to the 4.4 - Future milestone on Apr 19, 2024
  3. modified the milestones: 4.5 - Current, Backlog on Feb 7, 2025
  4. modified the milestones: Backlog, 4.7 - Next on Jun 6, 2025
  5. modified the milestones: 4.7 - Current, Backlog on Oct 31, 2025
  6. DeepDiver1975 commented on Jun 30, 2026

    @DeepDiver1975
    Contributor

    Confirmed, still present on current master.

    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.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions