Skip to content

UnlockWithMasterPassword and ChangeWithMasterPassword skip a pending v0 migration and unlock an empty placeholder #689

Closed

Description

@lbssousa

With oo7 0.7.1, a gnome-keyring file encrypted with a password the daemon's secret doesn't open is registered as a pending migration, and its collection is a locked placeholder backed by a v1 path that doesn't exist yet (load_keyring in server/src/service/mod.rs). An unlock through Service.Unlock and the prompter looks the collection up in pending_migrations and migrates the file with the typed secret, which works.

org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface doesn't go through that path. UnlockWithMasterPassword and ChangeWithMasterPassword (server/src/gnome/internal.rs) call Collection::set_locked(false, secret) directly, so they unlock the empty placeholder. The legacy file is never migrated, its items don't show up, and the pending migration stays registered.

Steps

  1. Have a gnome-keyring foo.keyring encrypted with password pw, and start oo7-daemon with a different secret (for example the systemd credential).
  2. Call UnlockWithMasterPassword("/org/freedesktop/secrets/collection/foo", pw).

Expected: the file is migrated with pw and the collection holds its items, the same as an unlock at the prompt.
Actual: the collection unlocks with no items.

The same applies to ChangeWithMasterPassword. That one would let a tool convert such a keyring and move it to the daemon's secret in one call, without a prompt. For now we convert the file with oo7-cli migrate while the daemon is stopped, and then call ChangeWithMasterPassword on the v1 keyring.

Activity

  1. added
    bug
    on Nov 19, 2026
  2. bilelmoussaoui commented on Nov 19, 2026

    @bilelmoussaoui
    Collaborator

    Thanks for the report. This was caused because a placeholder (empty keyring) can be validated with any secret as it contains no items to validate it secret...

  3. drshields commented on Nov 19, 2026

    @drshields

    Filed #696 for the Seahorse/ChangeWithPrompt variant of this: the prompt path still calls change_secret() directly and does not consult pending_migrations, so the same placeholder problem appears to affect password changes made from Seahorse. Feel free to fold it into this fix if it is the same root cause.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugserver

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions