Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Make password generator length use existing length if available #2318
Adds optional length parameter to
This seems like a clean approach to me, as the use of the default parameter keeps all previous usage the same, except when a value is passed in. Another approach could be to add a public
Edit: Additionally, I made the change discussed in my comment below. Now, if the entry edit is closed without saving, any changes to the password generator length will not carry over into new entries.
Motivation and context
How has this been tested?
Types of changes
Thinking about it more, I don't really feel that the password generator widget keeping its last used length value as the in-memory equivalent of
Instead I feel like it should it should:
This would mean that the standalone generator, the generator widget (on a new or passwordless entry), and the ini file are always consistent with each other.
This behavior would be different from how keepassxc currently behaves (regardless of looking at password existing password length), however, I think it makes more sense than having the length that wasn't even used carry over into fresh entries.