Janek Bevendorff
113c8eb702
Add CLI tests and improve coding style and i18n
...
The CLI module was lacking unit test coverage and showed some severe
coding style violations, which this patch addresses.
In addition, all uses of qCritical() with untranslatble raw char*
sequences were removed in favor of proper locale strings. These are
written to STDERR through QTextStreams and support output
redirection for testing purposes. With this change, error messages don't
depend on the global Qt logging settings and targets anymore and go
directly to the terminal or into a file if needed.
This patch also fixes a bug discovered during unit test development,
where the extract command would just dump the raw XML contents without
decrypting embedded Salsa20-protected values first, making the XML
export mostly useless, since passwords are scrambled.
Lastly, all CLI commands received a dedicated -h/--help option.
2018-10-19 21:49:54 +02:00
Jake Howard
ca328242bc
Don't show application if we're only showing the help / version
2018-10-14 16:20:28 -04:00
Nick Fox
c19df0130b
Allows printing version with -v when an instance is already running
...
Fixes #1362 by checking if the -v argument was used when deciding
whether to print the "keepassxc is already running" error message
2018-07-08 19:51:11 -04:00
Jonathan White
aae6d09fd3
Merge branch 'master' into develop
...
Conflicts:
src/CMakeLists.txt
src/autotype/xcb/AutoTypeXCB.cpp
src/browser/BrowserAction.cpp
src/browser/BrowserService.cpp
src/browser/BrowserService.h
src/browser/BrowserSettings.h
src/browser/NativeMessagingHost.cpp
src/browser/NativeMessagingHost.h
src/gui/EditWidgetIcons.cpp
src/gui/EditWidgetIcons.h
src/gui/MainWindow.cpp
src/proxy/NativeMessagingHost.cpp
tests/TestOpenSSHKey.cpp
2018-05-07 23:24:30 -04:00
Steven Noonan
056bbaa921
Improve fetch favicon ( #1786 )
...
* Eliminate dependency on libcurl in favor of Qt5Network code
* Supports older Qt versions without QNetworkRequest::FollowRedirectsAttribute
* Show a progress dialog when downloading the favicon. The main utility
of this is giving the user the option to cancel a download attempt
(e.g. if it's taking too long). Canceling will try the next fallback URL in the list.
* Try three different ways to obtain the favicon, in this order:
1) Direct to fully-qualified domain (e.g. https://foo.bar.example.com/favicon.ico )
2) Direct to 2nd-level domain (e.g. https://example.com/favicon.ico )
3) Google lookup for 2nd-level domain name (if enabled in settings)
I changed the Google lookup, because a match is more likely to be found
for the 2nd level domain than for the fully-qualified name.
Google's error behavior is strange. If it doesn't find a match, it
doesn't return an error. Instead, it returns a generic default icon,
which is not really the desired result. This also means that unless we
have some way to detect that we've received the generic icon, we can't
fall back to any alternatives.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2018-04-04 22:18:58 -04:00
Louis-Bertrand Varin
8324d03f0a
Formatting the code.
2018-03-31 16:01:30 -04:00
Joan Bruguera
bf9c1b3205
Cover the fix/WA for Linux #1595 behind compile time flags & comment.
2018-03-12 21:30:25 +01:00
Joan Bruguera
319c8201be
Fix flickering & not restoring from tray on some Linuxes ( #1595 ).
...
Fix/work around KeePassXC flickering and not restoring from tray on some Linux systems, which happens if the window is hidden and minimized by code at the same time (see issue #1595 ).
2018-03-12 21:30:25 +01:00
Alessio Di Mauro
f164847f9b
Replace in.readLine() with Utils::getPassword()
...
Fixes #1673 .
2018-03-09 11:21:58 +01:00
Janek Bevendorff
63a17f697c
Fix freeze and high CPU usage on invalid STDIN data, resolves #1620
2018-03-06 21:55:32 +01:00
Janek Bevendorff
ea5c6c1eb5
Process basic file, password and keyfile command line parameters
...
Resolves #1358 , resolves #1533 , resolves #1600
2018-03-03 10:18:16 +01:00
Jonathan White
542ee42313
Add Argon2Kdf and enable parameters in db settings
...
Note: This implementation is not yet connected to the
database itself and will corrupt existing kdbx3 db's.
* Implemented memory and parallelism parameters for Argon2Kdf
* Using libargon2; libsodium does not support Argon2d algorithm
* Moved basic rounds parameter into Kdf class
* Reimplemented benchmark algorithm; previous was utterly broken
2018-01-13 14:23:30 -05:00
varjolintu
06518c5736
keepassxc-browser
2018-01-04 21:42:20 +01:00
frostasm
165d664524
Pass (using IPC) command line filenames to already running instance
2018-01-03 16:12:05 +02:00
Janek Bevendorff
71f38f17cd
Restrict Q_OS_UNIX ifdefs to non-Mac platforms
2017-12-27 20:35:05 +01:00
Rafael Sadowski
e29d3497eb
s/Q_OS_LINUX/Q_OS_UNIX/g
...
Enable support for UNIX like OS.
2017-12-27 20:35:05 +01:00
Janek Bevendorff
5b525eb9ca
Refactor Translator class to load qtbase translations from local directory if available
2017-12-23 17:47:46 +01:00
Michael Lass
4c76c97762
Open previously opened databases in correct order
...
In LastOpenedDatabases, the most recently opened file is listed first and the
least recently opened one is listed last. If the databases are re-opened in this
order, LastOpenedDatabases is reversed afterwards. To avoid this, load the files
in reverse order, so LastOpenedDatabases is not modified.
2017-07-27 21:37:48 +02:00
thez3ro
cdad46377b
Fix Single Istance behavior
2017-07-19 00:23:58 +02:00
Jonathan White
702a68307a
Allow multiple instances when debugging ( #651 )
2017-06-20 16:17:35 -04:00
thez3ro
a53b111182
Update and fix copyright headers
2017-06-14 15:54:43 +02:00
Anton Gulenko
58463bc3dc
Fixed string literals
2017-05-09 14:13:25 +02:00
VukoDrakkeinen
d1310b3337
Raise existing instance
...
Closes #193
2017-05-09 14:06:45 +02:00
Louis-Bertrand Varin
beba23ea2e
Prioritize explicit databases.
2017-04-08 17:46:06 -04:00
seatedscribe
3fcf342fbc
Merge remote-tracking branch 'upstream/develop' into feature/import-csv-format
2017-03-16 21:25:38 +01:00
Janek Bevendorff
2587bac300
Enable ASAN option in Travis build
2017-03-15 15:23:52 +01:00
Janek Bevendorff
504bd40263
Prevent massive end-of-process leak sanitizer dump
2017-03-15 15:23:50 +01:00
seatedscribe
afdf02b4be
Implement import of databases in CSV (Comma Separated Values) format (i.e. from other password managers)
2017-03-05 21:27:29 +01:00
Edward Jones
873871a42c
Update text in HTTP settings and a hard-to-translate command line hint
2017-02-21 22:36:11 +01:00
Janek Bevendorff
cc44a833d5
Revert "Enable High DPI scaling", resolves #323
...
This reverts commit 188cac34ce .
2017-02-19 23:42:05 +01:00
Janek Bevendorff
1b8366f040
Enable High DPI scaling, resolves #221
2017-02-16 20:57:17 -05:00
Janek Bevendorff
fed210dc38
Also show when minimize on startup is enabled, but not minimize to tray
2017-02-14 22:21:53 +01:00
Janek Bevendorff
7a344930ec
Don't try to show window when 'Minimize at startup' is enabled, prevents rendering glitches in Unity, resolves #304
2017-02-14 22:21:53 +01:00
Janek Bevendorff
292ed892c1
Fix Windows linker and runtime errors when building against static Qt
2017-01-26 01:15:12 +01:00
Janek Bevendorff
9261d8ae9d
Force focus on password field, resolves #116 ( #117 )
...
Also remove redudant code for minimizing to tray
2016-11-26 09:37:25 -05:00
Janek Bevendorff
19a960856c
Fix minimize at startup and decouple various tray and minimization options ( #109 )
...
* Hide window on startup when configured to start minimized, fixes #105
* Decouple different systray and minimization options, fixes #64
* Commit missing changes in main.cpp to minimize at startup
* Remove obsolete code
2016-11-23 18:15:51 -05:00
Jonathan White
ccec84aef2
Rename application to KeePassXC and change icon ( #70 )
2016-11-03 00:05:30 -04:00
Jack Thomasson
7000e80465
add command line option --pw-stdin to accept password from stdin
2016-10-24 12:22:02 -06:00
Felix Geyer
fff9e7ac46
Convert Q_FOREACH loops to C++11 for loops.
...
Q_FOREACH will de deprecated soon.
2016-10-02 21:45:55 -04:00
Jonathan White
aba4fa94be
Merge remote-tracking branch 'keepassx/master'
...
# Conflicts:
# README.md
# share/translations/keepassx_de.ts
# src/CMakeLists.txt
# src/gui/MainWindow.h
2016-02-27 19:11:09 -05:00
Felix Geyer
ecfbf72a57
Merge branch '2.0'
2015-12-15 21:05:00 +01:00
Felix Geyer
17ab438c5a
Make sure Windows doesn't load DLLs from the current working directory.
2015-12-06 14:32:06 +01:00
Felix Geyer
dc7b6623a9
Merge branch '2.0'
2015-10-11 10:44:30 +02:00
Felix Geyer
58ed99d562
OS X: Restore main window when clicking on the docker icon.
...
Apparently this worked previously. Maybe a regression in Qt?
Refs #326
2015-10-10 17:10:27 +02:00
Felix Geyer
3dd98deecc
Use QStandardPaths::DataLocation instead of AppDataLocation.
...
AppDataLocation is only available in Qt >= 5.4.
2015-09-12 18:41:48 +02:00
Felix Geyer
7fa0eddc5f
Make C++11 mandatory.
2015-09-12 13:55:50 +02:00
Felix Geyer
5ad9edc3fd
QDesktopServices::storageLocation() calls to QStandardPaths.
2015-09-12 13:51:49 +02:00
Felix Geyer
5a745da07b
Remove QCOmmandLineParser.
...
It is part of Qt >= 5.2.
2015-09-12 13:51:49 +02:00
Felix Geyer
65e8732eeb
Remove --password command line option.
...
Passing passwords on the command line is unsafe.
2015-07-17 21:31:36 +02:00
denk-mal
0390c67c4d
allow multiple databeses on command line
2015-06-23 11:40:54 +02:00
denk-mal
1f6161132e
makr filename parameter as optinal
2015-06-23 11:22:15 +02:00
Felix Geyer
4cdb9a645d
Add an option to display a tray icon.
...
Also implement "Minimize to tray" functionality.
2014-11-02 11:44:03 +01:00
Felix Geyer
0d6117bf4c
Do some basic self-checks when initializing the crypto backend.
2014-06-15 11:17:40 +02:00
Felix Geyer
28694ae687
Add initial support for translations.
2014-05-18 01:33:22 +02:00
Felix Geyer
678c4a8ece
Set the application name and version in QApplication.
2014-01-18 15:31:24 +01:00
Felix Geyer
bc14898b13
Replace ArgumentParser with a backport of QCommandLineParser from Qt 5.2.
2014-01-18 15:23:55 +01:00
Felix Geyer
6504b6f2bd
Drop Qt module name from include statements.
...
This is a preparation to be able to build KeePassX against Qt 5.
2013-10-03 15:18:16 +02:00
Florian Geyer
94ac9c9ea1
Rename config key for last opened databases.
2013-04-27 11:22:38 +02:00
Florian Geyer
bbf183bef7
Add settings option to control if previous databases are opened on startup.
...
Closes #36
2013-04-18 22:42:22 +02:00
Florian Geyer
6f92188323
Open last used databases on startup.
...
Refs #36
2013-04-18 22:37:04 +02:00
Tobias Tangemann
ef46b3e8ad
Disable menu icons for osx.
...
https://gitorious.org/keepassx/keepassx/merge_requests/23
2013-04-06 18:02:43 +02:00
Florian Geyer
2558e6db79
First draft of an argument parser.
...
Possibility to set custom config path.
2013-04-06 11:00:45 +02:00
Felix Geyer
c1a45d6258
Fix typo.
2012-10-27 00:26:43 +02:00
Felix Geyer
169e6327ea
Disable core dumps and tracing on *nix.
...
But only when built in release mode.
Closes #4
2012-10-21 12:33:00 +02:00
Felix Geyer
fb4367f9ef
Remove some unneeded includes.
2012-07-08 10:27:31 +02:00
Felix Geyer
76eb935024
Small fixes in Application.
2012-05-21 22:11:26 +02:00
Florian Geyer
b5249d196d
Rename KeePassApp to Application and move it to gui directory.
2012-05-21 22:04:40 +02:00
Florian Geyer
d445bf1ecd
Use a signal to connect to a slot in main window.
...
Coding style fixes.
http://gitorious.org/keepassx/keepassx/merge_requests/10
2012-05-21 22:04:40 +02:00
Tobias Tangemann
679398be00
Handle OSX Finder events
2012-05-21 22:04:40 +02:00
Felix Geyer
739f4d97a6
Coding style fixes.
2012-05-02 17:04:03 +02:00
Florian Geyer
64170a16ab
Fix command line argument parsing.
2012-04-28 21:43:23 +02:00
Felix Geyer
974d4f5807
Allow passing a filename and password on the command line.
...
Passing passwords on the command line is not exactly best practice but will
greatly improve development productivity.
2012-04-24 11:47:16 +02:00
Felix Geyer
2e011d5362
Improve code style.
2012-04-18 22:08:22 +02:00
Felix Geyer
35066bca8b
Implement global config class.
2011-12-25 19:17:40 +01:00
Felix Geyer
c7ed5f8421
Implement opening/closing databases.
2011-11-13 14:55:20 +01:00
Felix Geyer
1ee0c804be
Add MainWindow.
2010-09-19 16:59:32 +02:00
Felix Geyer
d508c2dd68
Open a kdbx file in main() and add more SymmetricCipher tests.
2010-09-13 23:25:48 +02:00
Felix Geyer
1cfc34361a
Add interface for database reader/writer.
2010-08-31 16:18:45 +02:00
Felix Geyer
ee4c2c3dd4
Move core/Parser to format/KeePass2XmlReader and core/Writer to format/KeePass2XmlWriter.
2010-08-31 14:39:35 +02:00
Felix Geyer
621b367f45
Add EntryView and DatabaseWidget.
2010-08-24 22:26:52 +02:00
Felix Geyer
e28ed4891b
Add signal for changes in Group.
2010-08-15 15:03:47 +02:00
Felix Geyer
072a8ccf1b
Add GroupModel and corresponding unit test.
2010-08-15 12:31:48 +02:00
Felix Geyer
3e3c23e4ad
Initial import.
2010-08-07 15:10:44 +02:00