Skip to content

Conversation

@srijondeb
Copy link

This pull request addresses Issue #97, which reports that passwords entered in the terminal are visible in plaintext when using 7-Zip with -p on Linux — a serious security concern.

While PR #33 also proposes a solution, this submission offers a slightly different approach by directly updating the GetPassword() function to perform platform-specific echo masking using termios on Linux.

Summary of Changes:

  • Implements echo disabling using termios for Linux systems, mirroring existing Windows behavior via GetConsoleMode.
  • Replaces std::endl (which causes compatibility issues with CStdOutStream) with '\n' followed by Flush() to prevent build-time errors.
  • Ensures consistent password masking behavior across platforms.

Why This Matters:

This change ensures that password input on Linux no longer echoes to the terminal, reducing the risk of shoulder-surfing and inadvertent password leaks — improving both usability and security.

Fixes: #97

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.

7zip Password in terminal isn't masked

1 participant