geluk / pass-winmenu

An easy-to-use password manager for Windows, compatible with pass.
MIT License
385 stars 25 forks source link

Replace current password if password generation is used in edit mode #84

Closed Adrian-Steinert closed 8 months ago

Adrian-Steinert commented 3 years ago

Introduction First of all I want to thank you for your work. As I was taking a look into this tool, I stumbeled upon a behaviour which felt a little odd to me. I'm not sure if anyone else shares my opinion, that's why I hope to start a discussion here.

Topic to Discuss If an existing password file is edited with the internal editor, the file content is displayed in the textbox below (named ExtraContent, if I have done my research right). This also includes the password in the first line. If a new password is generated in edit mode and afterwards the "changes" should be saved, then I would expect, that the generated password replaces the old one. Otherwise I would need to replace the old password either by typing it or by copy+paste. If copy+paste is performed, the new password will be cached without deletion. In my opinion, this behaviour could be avoided.

My Thoughts Forcing a cache deletion after editing a password seems a bad idea in my opinion, because this would not be expected by a user. This could even interrupt the users workflow. My first idea to solve this "issue" was to force a replacement when using password generation in edit mode. On second thought, this might lead to another problem, because a user could first generate a password, then edit the password by hand and expect that his last changes will be saved. Another solution I thought about, was to use the "Add Password" window in edit mode as well. This way any odd behaviour regarding password changes could be avoided. The negative aspect here may be, that the look and feel of editing does not match previous expectations that well... The third solution I came up with, was an additional button in the edit window. Clicking this button replaces the first line of the textbox with the generated password. Even if the user changes anything in the textbox afterwards, these changes will be saved.

What do you think is the intended behaviour here? Should this be changed? If yes, what would be the best way to do it? (I'm sure that my list of options is not complete)

Thank you and kind regards

geluk commented 3 years ago

Thanks for thinking about this! This particular feature is something I've thought about as well, and I'm not quite sure how to deal with it. I didn't want it to automatically replace the password in an existing file, because some of the behaviour resulting from that may be a bit unexpected, as you mentioned.

The third solution you mentioned seems reasonable to me though. Especially when combined with some additional help features (like tooltips on features to explain more clearly what they mean), I think it will be reasonable to implement it like that.

geluk commented 8 months ago

Implemented in v1.14.