Skip to content

prompt_pass not working on windows when using CTRL+V to paste the password string to console #160

@atbagga

Description

@atbagga

Issue: prompt_pass is not working on windows with CTRL+V being used to enter the input

Repro:

### CODE PART 1 ###
# ** getpass_fails.py ** #

from knack.prompting import prompt_pass
password = prompt_pass(msg="Password: ")
print(password)

Steps to repro:

  1. Copy a text to clipboard using CTRL+C e.g. "mypassword"
  2. On CMD or powershell prompt python getpass_fails.py
  3. On Password: prompt use CTRL+V to paste the copied text.

Actual Behavior:
image

Expected Behavior:
image

WORKAROUND: The issue in only in using Ctrl+V to paste. If we use console menu or right click to paste it works correctly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions