AL icon indicating copy to clipboard operation
AL copied to clipboard

Input credentials disappears

Open graknol opened this issue 3 years ago • 4 comments

1. Describe the bug When entering username and password credentials, the input box disappears if it looses focus. This makes it hard to copy/paste both username and password.

This is the same issue as #4861

2. To Reproduce Steps to reproduce the behavior:

  1. Open an AL workspace
  2. Add a launch target with UserPassword authentication
  3. Download symbols or launch the app to trigger the credentials input box
  4. Try to copy values from notepad, or anywhere else
  5. Input box disappears

3. Expected behavior Keep both input boxes open when they lose focus.

4. Actual behavior Both input boxes disappear.

5. Versions:

  • AL Language: 8.4.586670
  • Visual Studio Code: 1.65.2
  • Business Central: 19.5
  • List of Visual Studio Code extensions that you have installed:
    • AL Language

Final Checklist

Please remember to do the following:

  • [x] Search the issue repository to ensure you are reporting a new issue

  • [x] Reproduce the issue after disabling all extensions except the AL Language extension

  • [x] Simplify your code around the issue to better isolate the problem

graknol avatar Mar 24 '22 11:03 graknol

The solution is to pass ignoreFocusOut: true in getUsername() and getPassword() in class UserPasswordAuth:

    getUsername(credentials) {
        return vscodeHelpers_1.showInputBox({ /* ... */, ignoreFocusOut: true }, true)
            .then(username => {
            credentials.username = username;
        });
    }
    getPassword(credentials) {
        return vscodeHelpers_1.showInputBox({ /* ... */, ignoreFocusOut: true, password: true }, true)
            .then(password => {
            credentials.password = password;
        });
    }

graknol avatar Mar 24 '22 11:03 graknol

Yeah, this is annoying, and means I have to copy the password from my password manager, go to VS Code, press the key combo, type the user name in, wait for the password box - and hope that by the time I've done all that, my password is still in the clipboard (hasn't been cleared by the pwd manager)...!

If I could type the user name, then get the password box, and go to the pwd manager to copy the password, without the box in VS Code disappearing, that would ease this a lot.

dzzzb avatar Mar 24 '22 11:03 dzzzb

Yeah, this is annoying, and means I have to copy the password from my password manager, go to VS Code, press the key combo, type the user name in, wait for the password box - and hope that by the time I've done all that, my password is still in the clipboard (hasn't been cleared by the pwd manager)...!

If I could type the user name, then get the password box, and go to the pwd manager to copy the password, without the box in VS Code disappearing, that would ease this a lot.

Also makes it impossible to use when username is randomly generated too, which I have on publicly exposed container instances to make them a little harder to break in to.

graknol avatar Mar 24 '22 12:03 graknol

We have internally discussed this issue and have decided not to accept this issue to be fixed at the moment to prioritize other issues. We will keep this open to possibly be fixed in the future. Thank you for raising this concern (and for the suggested fix too!).

thloke avatar Mar 31 '22 08:03 thloke