-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unlock previously opened databases with --pw-stdin #1087
Conversation
src/gui/DatabaseTabWidget.cpp
Outdated
@@ -129,7 +129,12 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw, | |||
while (i.hasNext()) { | |||
i.next(); | |||
if (i.value().canonicalFilePath == canonicalFilePath) { | |||
setCurrentIndex(databaseIndex(i.key())); | |||
if (!i.value().dbWidget->dbHasKey() && (!pw.isNull() || !keyFile.isEmpty())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer the logically equivalent !(pw.isNull() && keyFile.isEmpty())
, which is more intuitive to understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic sequence is used 15 lines below as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change it there, too. ;-)
9a1944c
to
0f3ae25
Compare
PR updated, request final review and merge @phoerious |
- Fixed entries with empty URLs being reported to KeePassHTTP clients [#1031] - Fixed YubiKey detection and enabled CLI tool for AppImage binary [#1100] - Added AppStream description [#1082] - Improved TOTP compatibility and added new Base32 implementation [#1069] - Fixed error handling when processing invalid cipher stream [#1099] - Fixed double warning display when opening a database [#1037] - Fixed unlocking databases with --pw-stdin [#1087] - Added ability to override QT_PLUGIN_PATH environment variable for AppImages [#1079] - Fixed transform seed not being regenerated when saving the database [#1068] - Fixed only one YubiKey slot being polled [#1048] - Corrected an issue with entry icons while merging [#1008] - Corrected desktop and tray icons in Snap package [#1030] - Fixed screen lock and Google fallback settings [#1029]
Description
Fixes #590 by passing the provided password (via stdin) to a database that was already opened due to "open previously open databases"
How has this been tested?
Manually
Types of changes
Checklist:
-DWITH_ASAN=ON
. [REQUIRED]