Skip to content

feat(auth): mask password arguments in login TUI - #590

Merged
gg582 merged 1 commit into
uncensoredfrom
feat/mask-login-password
Oct 26, 2026
Merged

gg582 merged 1 commit into
uncensoredfrom
feat/mask-login-password

Conversation

@gg582

@gg582 gg582 commented Oct 26, 2026

Copy link
Copy Markdown
Member

Summary

Mask password arguments with * when entering /login <password> or /signup <password> in the login TUI.

Changes

  • Introduce session_is_password_command: returns true once the buffer contains a /login or /signup command prefix (case-insensitive, allows leading whitespace).
  • Update session_read_line:
    • When mask_input is enabled or session_is_password_command(buf) matches, echo * instead of plaintext.
    • Maintain null-termination after input and backspace operations to ensure safe string comparisons.
  • Add unit tests in tests/unit/test_host_persistence.c verifying matching behavior for /login, /signup, and non-password commands.

@gg582
gg582 merged commit 5239a55 into uncensored Oct 26, 2026
2 checks passed
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