Skip to content

SetConsoleMode(console, mode & ~ENABLE_ECHO_INPUT) does not work #2354

@floriansimon1

Description

@floriansimon1
  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options
git version 2.21.0.windows.1
cpu: x86_64
built from commit: 2481c4cbe949856f270a3ee80c802f5dd89381aa
sizeof-long: 4
sizeof-size_t: 8
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
    Windows 10, x64
$ cmd.exe /c ver
Microsoft Windows [Version 10.0.16299.1387]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
    Defaults

### Details

 - Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
CMD

 - What commands did you run to trigger this issue? If you can provide a
   [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)
   this will help us understand the issue.

* Create a password-protected zip file
* Try to extract its content using the 7z.exe CLI program (`7z.exe x <thezip>`)
* Type a password

 - What did you expect to occur after running these commands?
No echoed password

 - What actually happened instead?
Notice that the password is echoed

- Additional info
7z seems to read passwords using this bit of code: https://github.com/kornelski/7z/search?q=SetConsoleMode&unscoped_q=SetConsoleMode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions