From 65e8732eeb8f31db31d88654a81bb79f13576e57 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Fri, 17 Jul 2015 21:31:36 +0200 Subject: [PATCH] Remove --password command line option. Passing passwords on the command line is unsafe. --- src/main.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2bdef5bde..288392c0e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -57,9 +57,6 @@ int main(int argc, char** argv) QCommandLineOption configOption("config", QCoreApplication::translate("main", "path to a custom config file"), "config"); - QCommandLineOption passwordOption("password", - QCoreApplication::translate("main", "password of the database (DANGEROUS!)"), - "password"); QCommandLineOption keyfileOption("keyfile", QCoreApplication::translate("main", "key file of the database"), "keyfile"); @@ -67,7 +64,6 @@ int main(int argc, char** argv) parser.addHelpOption(); parser.addVersionOption(); parser.addOption(configOption); - parser.addOption(passwordOption); parser.addOption(keyfileOption); parser.process(app); @@ -92,7 +88,7 @@ int main(int argc, char** argv) if (!args.isEmpty()) { QString filename = args[0]; if (!filename.isEmpty() && QFile::exists(filename)) { - mainWindow.openDatabase(filename, parser.value(passwordOption), parser.value(keyfileOption)); + mainWindow.openDatabase(filename, QString(), parser.value(keyfileOption)); } }