mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
Remove --password command line option.
Passing passwords on the command line is unsafe.
This commit is contained in:
parent
e82015d419
commit
65e8732eeb
@ -57,9 +57,6 @@ int main(int argc, char** argv)
|
|||||||
QCommandLineOption configOption("config",
|
QCommandLineOption configOption("config",
|
||||||
QCoreApplication::translate("main", "path to a custom config file"),
|
QCoreApplication::translate("main", "path to a custom config file"),
|
||||||
"config");
|
"config");
|
||||||
QCommandLineOption passwordOption("password",
|
|
||||||
QCoreApplication::translate("main", "password of the database (DANGEROUS!)"),
|
|
||||||
"password");
|
|
||||||
QCommandLineOption keyfileOption("keyfile",
|
QCommandLineOption keyfileOption("keyfile",
|
||||||
QCoreApplication::translate("main", "key file of the database"),
|
QCoreApplication::translate("main", "key file of the database"),
|
||||||
"keyfile");
|
"keyfile");
|
||||||
@ -67,7 +64,6 @@ int main(int argc, char** argv)
|
|||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
parser.addVersionOption();
|
parser.addVersionOption();
|
||||||
parser.addOption(configOption);
|
parser.addOption(configOption);
|
||||||
parser.addOption(passwordOption);
|
|
||||||
parser.addOption(keyfileOption);
|
parser.addOption(keyfileOption);
|
||||||
|
|
||||||
parser.process(app);
|
parser.process(app);
|
||||||
@ -92,7 +88,7 @@ int main(int argc, char** argv)
|
|||||||
if (!args.isEmpty()) {
|
if (!args.isEmpty()) {
|
||||||
QString filename = args[0];
|
QString filename = args[0];
|
||||||
if (!filename.isEmpty() && QFile::exists(filename)) {
|
if (!filename.isEmpty() && QFile::exists(filename)) {
|
||||||
mainWindow.openDatabase(filename, parser.value(passwordOption), parser.value(keyfileOption));
|
mainWindow.openDatabase(filename, QString(), parser.value(keyfileOption));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user