Skip to content
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

--pw-stdin stopped working with KeePassXC 2.3 #1600

Closed
alfredkrohmer opened this issue Mar 2, 2018 · 5 comments
Closed

--pw-stdin stopped working with KeePassXC 2.3 #1600

alfredkrohmer opened this issue Mar 2, 2018 · 5 comments
Milestone

Comments

@alfredkrohmer
Copy link

alfredkrohmer commented Mar 2, 2018

Expected Behavior

Passing --pw-stdin on the command line (and passing the password to stdin) should open the database on startup.

Current Behavior

KeePassXC starts with the welcome screen and doesn't open any databases.

Context

Happens with my older database as well as with a newly created database. Adding --keyfile doesn't work either.

Debug Info

KeePassXC - Version 2.3.0
Revision: 4c0ed74

Libraries:

  • Qt 5.10.1
  • libgcrypt 1.8.2

Operating system: Arch Linux
CPU-Architektur: x86_64
Kernel: linux 4.15.3-2-ARCH

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • Legacy Browser Integration (KeePassHTTP)
  • SSH Agent
  • YubiKey
@TheChiefMeat
Copy link

TheChiefMeat commented Mar 2, 2018

Yep, the code for launching the database via a terminal is now completely missing from the main.cpp that was present in 2.2.4:

  const bool pwstdin = parser.isSet(pwstdinOption);
   for (const QString& filename: fileNames) {
       if (!filename.isEmpty() && QFile::exists(filename) && !filename.endsWith(".json", Qt::CaseInsensitive)) {
           QString password;
           if (pwstdin) {
               static QTextStream in(stdin, QIODevice::ReadOnly);
               password = in.readLine();
           }
       } -----THIS LINE IS MISSING:-----  mainWindow.openDatabase(filename, password, parser.value(keyfileOption))
   }

   int exitCode = app.exec();

@joanbm
Copy link
Contributor

joanbm commented Mar 2, 2018

Same issue here, I can confirm that @TheChiefMeat 's solution works.

@droidmonkey droidmonkey added this to the 2.3.1 milestone Mar 2, 2018
@Generator
Copy link

This is a duplicate of #1358

@phoerious
Copy link
Member

Probably even the same #1533

@phoerious
Copy link
Member

Indeed, it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants