Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] password prompt in knack does not work with CTRL+V in windows #921

Closed
atbagga opened this issue Dec 10, 2019 · 2 comments
Closed

[Bug] password prompt in knack does not work with CTRL+V in windows #921

atbagga opened this issue Dec 10, 2019 · 2 comments
Assignees
Labels
Area: ProToCol The bugs under ProToCol Team bug

Comments

@atbagga
Copy link
Collaborator

atbagga commented Dec 10, 2019

Az devops login password prompt does not work when ctrl+v is used on the prompt.

microsoft/knack#160

Possible change to make it easy to troubleshoot will be to add token length check.. and if the length is too small than expected (guid length) then warning message to the console indicating this issue.
And login suggested through right click.

@atbagga atbagga added bug Area: ProToCol The bugs under ProToCol Team labels Dec 10, 2019
@atbagga atbagga pinned this issue Dec 10, 2019
@geverghe
Copy link
Contributor

geverghe commented Jan 8, 2020

Let's go ahead with the string length check since the *(star) experience is again a framework level change that might take time. There are two things that we need to convey

  1. Inform the user that the token has not been entered
  2. Address the common scenario which is CTRL+ V

Further, there are two cases to login

  1. The user provides PAT with an organization
    Check if the PAT is valid. Provide success/failure message based on validation.
  2. The user provides PAT without any organization reference
    In this case it is not possible to validate the PAT as no organization reference is provided.

Proposed experience - Organization reference included and user does CTRL+V of token

$ az devops login --organization https://dev.azure.com/contoso
Token: 

Please provide a PAT token. If you are using CTRL+ V to paste the token, it won't work in command line or powershell - https://github.com/microsoft/knack/issues/160. Use right click or console menu to paste the token.

Token:
Successfully logged in to http://dev.azure.com/contoso using the token.
  • Token input comes up along with the provided error message till the user enters non 0 token or exits the command.

Proposed experience - Organization reference not included and user does CTRL+v of token

$ az devops login 
Token: 

Please provide a PAT token. If you are using CNTRL + V to paste the token, it won't work in command line or powershell - https://github.com/microsoft/knack/issues/160. Use right click or console menu to paste the token.

Token:
Token accepted.

@atbagga @ishitam8 @mitsha-microsoft for review.

@atbagga
Copy link
Collaborator Author

atbagga commented Jan 17, 2020

Fixed and released in version - 0.17.0.

Note: This is only a workaround to let the user know if CTRL+V was used on command prompt or powershell on windows. The issue still exists as described in microsoft/knack#160

@atbagga atbagga closed this as completed Jan 17, 2020
@atbagga atbagga unpinned this issue Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ProToCol The bugs under ProToCol Team bug
Projects
None yet
Development

No branches or pull requests

3 participants