Skip to content

fix(gui): accept an empty passphrase when opening a repository#182

Open
MaxenceG2M wants to merge 1 commit into
borgbase:mainfrom
MaxenceG2M:fix/gui-empty-passphrase
Open

fix(gui): accept an empty passphrase when opening a repository#182
MaxenceG2M wants to merge 1 commit into
borgbase:mainfrom
MaxenceG2M:fix/gui-empty-passphrase

Conversation

@MaxenceG2M

Copy link
Copy Markdown

The password dialog returns Some(value) on submit (including an empty
field) and None on cancel/close, so the two cases are already
distinguishable. resolve_passphrase_tracked was filtering the empty
string to None, collapsing "OK on an empty field" into the same state
as a dismissed prompt; downstream with_passphrase_retry then reported
the encrypted repo as Canceled and never opened it.

An empty passphrase is a legitimate, CLI-supported state (the CLI passes
whatever is typed straight through, so vykar init + Enter/Enter creates
such a repo). Let the empty string flow through as Some(""); only
None (dismissed) now means "no passphrase entered".

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

The password dialog returns `Some(value)` on submit (including an empty
field) and `None` on cancel/close, so the two cases are already
distinguishable. `resolve_passphrase_tracked` was filtering the empty
string to `None`, collapsing "OK on an empty field" into the same state
as a dismissed prompt; downstream `with_passphrase_retry` then reported
the encrypted repo as `Canceled` and never opened it.

An empty passphrase is a legitimate, CLI-supported state (the CLI passes
whatever is typed straight through, so `vykar init` + Enter/Enter creates
such a repo). Let the empty string flow through as `Some("")`; only
`None` (dismissed) now means "no passphrase entered".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant