Skip to content

Improvements and bug fixes#37

Merged
Digiyang merged 2 commits intomainfrom
improvements/bug-fixes
Feb 16, 2026
Merged

Improvements and bug fixes#37
Digiyang merged 2 commits intomainfrom
improvements/bug-fixes

Conversation

@Digiyang
Copy link
Owner

Summary

  • Input retry loops: Validation failures (empty user ID, short password, mismatched passwords, invalid filename) now show an error popup and re-prompt instead of aborting the entire TUI flow
  • Default cipher selection: Empty cipher input defaults to Cv25519, matching how validity already defaults to 2 years
  • User ID path sanitization (Issue Sanitize User ID before using it in file paths #36): generate_keypair now sanitizes ../, /, and \ in User IDs before constructing file paths, preventing writes outside ~/.pgpman/

Closes #36

Wrap each validation site in a retry loop that shows the error via
show_input_popup and re-prompts instead of aborting the entire TUI flow.
Default to Cv25519 when no cipher is selected, matching the existing
default behavior for validity duration.
Replace '..', '/' and '\' with '_' in the user ID before using it as
a filename component in generate_keypair. This prevents a crafted User
ID containing '../' from writing files outside ~/.pgpman/. (Issue #36)
@Digiyang Digiyang merged commit a7baeb7 into main Feb 16, 2026
5 checks passed
@Digiyang Digiyang deleted the improvements/bug-fixes branch February 16, 2026 11:23
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.

Sanitize User ID before using it in file paths

1 participant