-
Notifications
You must be signed in to change notification settings - Fork 2k
In some situations, pressing Enter does *not* reuse the previous password #97
Description
Description
In commit:22900ea, while redoing some of the password/auth stuff, I updated the password memory functionality to only overwrite env.password when it was empty. This was in an attempt to fix problems with multiple hosts with different (usually sudo) passwords, though it's unclear to me right now what the exact problem was -- it had to do with remembering the "wrong" password and making it kind of clunky to move down such a list of hosts.
However, what this means is that in the following scenario can occur:
- User enters incorrect password; since env.password is empty, it gets the incorrect password.
- User is prompted again (because previous password failed)
- User enters correct password; since env.password is non-empty, it is NOT updated, only the local (to the current operation) password var is updated.
- TIme passes, other operations execute, sudo timer expires (or whatever)
- User is prompted again and hits Enter, expecting Fab to use the previously entered, correct, password
- Fab uses env.password, which is still set to the first, incorrect password.
- Wailing and gnashing of teeth ensues
Which is pretty bad and hard to understand.
For now, fix this by reverting to the old "always update env.password when user enters something at a prompt", which I think is a lesser evil and should line up closer with user expectations.
Regarding the per-host passwords, that should be handled in #4, which would be a better solution than this current behavior anyways.
Originally submitted by Jeff Forcier (bitprophet) on 2009-11-10 at 11:42am EST
Relations
- Related to Per-user/host password memory (was: Possible issue in password memory) #192: Per-user/host password memory (was: Possible issue in password memory)
- Related to Allow for storing/using metadata about hosts #4: Allow for storing/using metadata about hosts
Closed as Done on 2009-11-10 at 11:44am EST