Pasting string to password prompt fails. #3924

Closed
opened 2026-01-30 23:33:26 +00:00 by claunia · 8 comments
Owner

Originally created by @urtabajev on GitHub (Sep 17, 2019).

Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.4.2382.0

Steps to reproduce

  1. Start ssh connection to host which asks password for authentication or use Python getpass.getpass()
  2. Paste string from clipboard buffer to prompt
  3. Correct information will not be pasted and and Python just stays waiting for input even after enter

Expected behavior

Correct string will be pasted to prompt and programs should continue as expected.

Actual behavior

Password prompts will not recieve pasted string correctly.

Originally created by @urtabajev on GitHub (Sep 17, 2019). # Environment Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 0.4.2382.0 # Steps to reproduce 1. Start ssh connection to host which asks password for authentication or use Python getpass.getpass() 2. Paste string from clipboard buffer to prompt 3. Correct information will not be pasted and and Python just stays waiting for input even after enter # Expected behavior Correct string will be pasted to prompt and programs should continue as expected. # Actual behavior Password prompts will not recieve pasted string correctly.
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 17, 2019):

I can't reproduce this anywhere.
image

Can you provide a bit more information? What versions of what tools are you using? Has it ever worked?

@DHowett-MSFT commented on GitHub (Sep 17, 2019): I can't reproduce this anywhere. ![image](https://user-images.githubusercontent.com/14316954/65059417-d5c7b680-d92a-11e9-8397-dfabd307f7e5.png) Can you provide a bit more information? What versions of what tools are you using? Has it ever worked?
Author
Owner

@nidheekamble commented on GitHub (Sep 19, 2019):

Like @DHowett-MSFT, I too am unable to reproduce the issue with the exact expected behaviour described in the issue. The pasted string isn't echoed, but it doesn't result in Python waiting for an input nonetheless.

Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import getpass
>>> getpass.getpass()
Password:
'blahblah'
>>> getpass.getpass()
Password:
'\x16'
>>>

@urtabajev
Does this help? https://github.com/microsoft/knack/issues/160

@nidheekamble commented on GitHub (Sep 19, 2019): Like @DHowett-MSFT, I too am unable to reproduce the issue with the *exact* expected behaviour described in the issue. The pasted string isn't echoed, but it doesn't result in Python waiting for an input nonetheless. `Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32` `Type "help", "copyright", "credits" or "license" for more information.` `>>> import getpass` `>>> getpass.getpass()` `Password:` `'blahblah'` `>>> getpass.getpass()` `Password:` `'\x16'` `>>>` @urtabajev Does this help? https://github.com/microsoft/knack/issues/160
Author
Owner

@ghost commented on GitHub (Sep 23, 2019):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Sep 23, 2019): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@urtabajev commented on GitHub (Sep 26, 2019):

For me following reporoduces issue perfectly:

python3 -c "import getpass;your_pwd = getpass.getpass('Enter password: '); print(your_pwd)"

When typing in password then execution reaches to print but when pasting string enter after that does not work and I can't select anything from this terminal window also when input is stuck until exectuion is interrupted.

@urtabajev commented on GitHub (Sep 26, 2019): For me following reporoduces issue perfectly: python3 -c "import getpass;your_pwd = getpass.getpass('Enter password: '); print(your_pwd)" When typing in password then execution reaches to print but when pasting string enter after that does not work and I can't select anything from this terminal window also when input is stuck until exectuion is interrupted.
Author
Owner

@urtabajev commented on GitHub (Sep 26, 2019):

Python in interactive mode, instead of normal mode will not reproduce issue.

@urtabajev commented on GitHub (Sep 26, 2019): Python in interactive mode, instead of normal mode will not reproduce issue.
Author
Owner

@urtabajev commented on GitHub (Oct 11, 2019):

Seems that Version: 0.5.2681.0 fixes it.

@urtabajev commented on GitHub (Oct 11, 2019): Seems that Version: 0.5.2681.0 fixes it.
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 29, 2019):

Yep, I can't reproduce this on 0.6 either.

@DHowett-MSFT commented on GitHub (Oct 29, 2019): Yep, I can't reproduce this on 0.6 either.
Author
Owner

@LazerFX commented on GitHub (Nov 22, 2019):

I suspect I may have a related issue (Reproducible on 0.6.2951.0):

I pasted my password into a docker logon prompt, which was an auto-generated, alphanumeric (string and number only, no special characters or tabs) API key. This pasted into the command line correctly, so I could (for instance) do an $env:docker-username=<apikey> and have it be visible, and then use a powershell script to apply the login value (As long-winded as this whole route turned out to be!); however, pasting directly into the docker login Password: prompt just responded with an unauthorised: BAD_CREDENTIAL response.

Pasting the same into either Windows CMD or Windows PowerShell (5 or 6.2) worked fine.

@LazerFX commented on GitHub (Nov 22, 2019): I suspect I may have a related issue (Reproducible on 0.6.2951.0): I pasted my password into a `docker logon` prompt, which was an auto-generated, alphanumeric (string and number only, no special characters or tabs) API key. This pasted into the command line correctly, so I could (for instance) do an `$env:docker-username=<apikey>` and have it be visible, and then use a powershell script to apply the login value (As long-winded as this whole route turned out to be!); however, pasting directly into the `docker login` `Password:` prompt just responded with an `unauthorised: BAD_CREDENTIAL` response. Pasting the same into either Windows CMD or Windows PowerShell (5 or 6.2) worked fine.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3924