mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-02 17:44:46 -05:00
Prevent duplicate characters in "Also choose from" field of password generator (#9803)
* Fixes #9797
This commit is contained in:
parent
07232f04c0
commit
ce01f6d7cd
@ -261,8 +261,10 @@ QVector<PasswordGroup> PasswordGenerator::passwordGroups() const
|
|||||||
if (!m_custom.isEmpty()) {
|
if (!m_custom.isEmpty()) {
|
||||||
PasswordGroup group;
|
PasswordGroup group;
|
||||||
|
|
||||||
for (auto ch : m_custom) {
|
for (const auto& ch : m_custom) {
|
||||||
group.append(ch);
|
if (!group.contains(ch)) {
|
||||||
|
group.append(ch);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
passwordGroups.append(group);
|
passwordGroups.append(group);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user