Skip to content

Commit

Permalink
Add password strength indicator to PasswordEditWidget
Browse files Browse the repository at this point in the history
Fixes #7437 (entry edit view only)
Fixes #5220
  • Loading branch information
jmdana authored and droidmonkey committed May 28, 2022
1 parent a4c5997 commit 0b93393
Show file tree
Hide file tree
Showing 16 changed files with 370 additions and 122 deletions.
96 changes: 60 additions & 36 deletions share/translations/keepassxc_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1426,10 +1426,6 @@ Backup database located at %2</source>
<source>Key File:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;p&gt;In addition to a password, you can use a secret file to enhance the security of your database. This file can be generated in your database&apos;s security settings.&lt;/p&gt;&lt;p&gt;This is &lt;strong&gt;not&lt;/strong&gt; your *.kdbx database file!&lt;br&gt;If you do not have a key file, leave this field empty.&lt;/p&gt;&lt;p&gt;Click for more information…&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Key file help</source>
<translation type="unfinished"></translation>
Expand All @@ -1442,11 +1438,6 @@ Backup database located at %2</source>
<source>Hardware Key:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;p&gt;You can use a hardware security key such as a &lt;strong&gt;YubiKey&lt;/strong&gt; or &lt;strong&gt;OnlyKey&lt;/strong&gt; with slots configured for HMAC-SHA1.&lt;/p&gt;
&lt;p&gt;Click for more information…&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hardware key help</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -1581,6 +1572,15 @@ If you do not have a key file, please leave the field empty.</source>
<source>Select hardware key…</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;p&gt;In addition to a password, you can use a secret file to enhance the security of your database. This file can be generated in your database&apos;s security settings.&lt;/p&gt;&lt;p&gt;This is &lt;strong&gt;not&lt;/strong&gt; your *.kdbx database file!&lt;br&gt;If you do not have a key file, leave this field empty.&lt;/p&gt;&lt;p&gt;Click for more information…&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;p&gt;You can use a hardware security key such as a &lt;strong&gt;YubiKey&lt;/strong&gt; or &lt;strong&gt;OnlyKey&lt;/strong&gt; with slots configured for HMAC-SHA1.&lt;/p&gt;
&lt;p&gt;Click for more information…&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DatabaseSettingWidgetMetaData</name>
Expand Down Expand Up @@ -5749,29 +5749,6 @@ We recommend you use the AppImage available on our downloads page.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PasswordEdit</name>
<message>
<source>Passwords do not match</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Passwords match so far</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Toggle Password (%1)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Generate Password (%1)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Warning: Caps Lock enabled!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PasswordEditWidget</name>
<message>
Expand Down Expand Up @@ -5950,10 +5927,6 @@ We recommend you use the AppImage available on our downloads page.</source>
<source>Also choose from:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Excluded characters: &quot;0&quot;, &quot;1&quot;, &quot;l&quot;, &quot;I&quot;, &quot;O&quot;, &quot;|&quot;, &quot;&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Exclude look-alike characters</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -6103,6 +6076,57 @@ Do you want to overwrite it?</source>
<comment>Password quality</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Excluded characters: &quot;0&quot;, &quot;1&quot;, &quot;l&quot;, &quot;I&quot;, &quot;O&quot;, &quot;|&quot;, &quot;&quot;</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PasswordWidget</name>
<message>
<source>Passwords do not match</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Passwords match so far</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Toggle Password (%1)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Generate Password (%1)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Warning: Caps Lock enabled!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quality: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Poor</source>
<comment>Password quality</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Weak</source>
<comment>Password quality</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Good</source>
<comment>Password quality</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Excellent</source>
<comment>Password quality</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PickcharsDialog</name>
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ set(keepassx_SOURCES
gui/MessageBox.cpp
gui/MessageWidget.cpp
gui/OpVaultOpenWidget.cpp
gui/PasswordEdit.cpp
gui/PasswordWidget.cpp
gui/PasswordGeneratorWidget.cpp
gui/ApplicationSettingsWidget.cpp
gui/Icons.cpp
Expand Down
7 changes: 4 additions & 3 deletions src/autotype/PickcharsDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<layout class="QGridLayout" name="charsGrid"/>
</item>
<item>
<widget class="PasswordEdit" name="selectedChars">
<widget class="PasswordWidget" name="selectedChars">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand Down Expand Up @@ -74,9 +74,10 @@
</widget>
<customwidgets>
<customwidget>
<class>PasswordEdit</class>
<class>PasswordWidget</class>
<extends>QLineEdit</extends>
<header>gui/PasswordEdit.h</header>
<header>gui/PasswordWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
Expand Down
8 changes: 4 additions & 4 deletions src/gui/DatabaseOpenWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
</widget>
</item>
<item>
<widget class="PasswordEdit" name="editPassword">
<widget class="PasswordWidget" name="editPassword">
<property name="accessibleName">
<string>Password field</string>
</property>
Expand Down Expand Up @@ -380,7 +380,7 @@
<number>0</number>
</property>
<item row="0" column="1">
<widget class="PasswordEdit" name="keyFileLineEdit">
<widget class="PasswordWidget" name="keyFileLineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand Down Expand Up @@ -617,9 +617,9 @@
</widget>
<customwidgets>
<customwidget>
<class>PasswordEdit</class>
<class>PasswordWidget</class>
<extends>QLineEdit</extends>
<header>gui/PasswordEdit.h</header>
<header>gui/PasswordWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
Expand Down
6 changes: 3 additions & 3 deletions src/gui/PasswordGeneratorWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</layout>
</item>
<item row="0" column="0">
<widget class="PasswordEdit" name="editNewPassword">
<widget class="PasswordWidget" name="editNewPassword">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
Expand Down Expand Up @@ -990,9 +990,9 @@ QProgressBar::chunk {
</widget>
<customwidgets>
<customwidget>
<class>PasswordEdit</class>
<class>PasswordWidget</class>
<extends>QLineEdit</extends>
<header>gui/PasswordEdit.h</header>
<header>gui/PasswordWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
Expand Down
Loading

0 comments on commit 0b93393

Please sign in to comment.