Commit Graph

2780 Commits

Author SHA1 Message Date
Steven Brudenell
d5de042529 Deactivate read-only mode for now. Fixes #803.
Read-only mode isn't in a good state and is triggering bugs. We'll come
up with a good design for read-only mode at a later time.
2020-05-14 20:27:36 -04:00
Jonathan White
49487f9d4a Fix changing focus around the main window using tab
* Override Qt's default [broken] behavior of handling Tab/Shift+Tab to navigate around the MainWindow. Completely fixes trapped focus.

* Improve handling of search results when navigating the UI.

* Fix selecting first entry after ending a search.

* Add keyboard shortcuts to directly focus on search (F1), Group List (F2), and Entry List (F3)

* Fixes #2878, #4636, and #4221
2020-05-14 20:21:32 -04:00
Jonathan White
5142981018 Significantly enhance hardware key robustness
* Significantly improve user experience when using hardware keys on databases in both GUI and CLI modes. Prevent locking up the YubiKey USB interface for prolonged periods of time. Allows for other apps to use the key concurrently with KeePassXC.

* Improve messages displayed to user when finding keys and when user interaction is required. Output specific error messages when handling hardware keys during database read/write.

* Only poll for keys when previously used or upon user request. Prevent continuously polling keys when accessing the UI such as switching tabs and minimize/maximize.

* Add support for using multiple hardware keys simultaneously. Keys are identified by their serial number which prevents using the wrong key during open and save operations.

* Fixes #4400
* Fixes #4065
* Fixes #1050
* Fixes #1215
* Fixes #3087
* Fixes #1088
* Fixes #1869
2020-05-14 20:19:56 -04:00
Jonathan White
a145bf9119 Complete refactor of Browser Integration classes
* Removed option to attach KeePassXC to the browser extension. Users must use the proxy application to communicate with KeePassXC.
* Significantly streamlined proxy code. Used same implementation of stdin/stdout interface across all platforms.
* Moved browser service entry point to BrowserService class instead of NativeMessagingHost. BrowserService now coordinates the communication to/from clients.
* Moved settings page definition out of MainWindow
* Decoupled BrowserService from DatabaseTabWidget
* Reduced complexity of various functions and cleaned the ABI (public vs private).
* Eliminated BrowserClients class, moved functionality into the BrowserService
* Renamed HostInstaller to NativeMessageInstaller and renamed NativeMessageHost to BrowserHost.
* Recognize XDG_CONFIG_HOME when installing native message file on Linux. Fix #4121 and fix #4123.
2020-05-14 17:14:17 -04:00
Wolfram Rösler
3b4057a78c Set URL placeholder text to https://example.com
Fixes #3830
2020-05-14 16:52:08 -04:00
BO41
f1080d633e Add group search
* Allow searching by group using the `group:` field.
* Group hierarchies can be searched by including a '/' in the search term.
2020-05-14 16:48:57 -04:00
Jonathan White
485852c9db CLI: Use stderr for password prompt
Fixes #3398.

Convert to QTextStream for all CLI IO and greatly improve CLI tests

* Completely overhaul CLI tests to be much more streamlined and easy to read. Removed unnecessary code blocks by using existing functions.

Co-authored-by: Emma Brooks <me@pluvano.com>
2020-05-14 16:33:25 -04:00
Jonathan White
612f8d2e5b Improve OPVault handling and replace test opvault
* Fix various bugs in opvault parsing to include: TOTP parsing, date handling, naming convention, attachments, and multiple url's.

* Remove category groups that don't have any entries.

* Simplify tests by focusing on the resulting database instead of the parsing mechanics.

* Remove proprietary "freddy" opvault in favor of self-made "keepassxc" opvault.

* Fix #4069, select opvault file on macOS
2020-05-14 15:17:28 -04:00
ameyer0
560209550c
Change settings checkbox texts to positive phrasing (#4715) 2020-05-10 21:35:08 -04:00
Jonathan White
dcff507e02 Fix various issues with KeeShare
* Fix #3790, shares now use the standard FileWatcher class to detect remote file changes using checksums and file system triggers.

* Fix #3895, macOS file selection no longer hangs the app.

* Restore saving of KeeShare settings accidentally removed by 596d2cf
2020-05-10 17:23:53 -04:00
Wolfram Rösler
3c19fdd193 Reports: Add "Known Bad" flag for entries
* Fixes #4168

* Introduce a custom data element stored with an entry to indicate that it is a "Known Bad" entry. This flag causes database reports to skip these entries.
* The current number of known bad entries is displayed in the statistics report.
* Add context menu to reports to easily exclude entries.
2020-05-08 20:51:11 -04:00
lshman
ce8f32e797
Show "New Entry" in the context menu even if an item is selected (#4617) 2020-05-08 20:48:30 -04:00
Janek Bevendorff
adc743503a Fix "Minimise at startup" on Windows
This option didn't work properly when "Hide window to system
tray when minimised" was also enabled.

I don't see a particular reason why Windows shouldn't be calling
hideWindow() like all other platforms. hideWindow() takes care of
choosing the correct minimisation mode based on the user's settings.
2020-05-07 09:57:45 +02:00
Jonathan White
071cc856da Improve MSI Installer
* Include checkboxes to install a desktop shortcut (default no) and start on login (default yes)
* Fix closing KeePassXC.exe and keepassxc-proxy.exe before installation starts
* Improve styling of launch after exit checkbox
2020-05-06 10:44:53 +02:00
Janek Bevendorff
4ba8ef30f2 Add option to launch KeePassXC at system startup
Fixes #1218
2020-05-06 10:44:53 +02:00
Janek Bevendorff
26ea274259 Fix menu menu spacing on low-DPI Windows 2020-05-04 11:02:04 +02:00
Ojas Anand
ab6222a5f8 Use QStringLiteral to concatenate result and unit 2020-05-04 00:05:28 +02:00
Ojas Anand
1b18c5d51d Add "Size" column
- Sizes are displayed in B, KiB, MiB, and GiB with 2 significant
  digits after the decimal
- Column is hidden by default
- TestEntryModel updated for testing proxy model
2020-05-04 00:05:28 +02:00
Janek Bevendorff
d9214db404 Implement Caps Lock warning 2020-05-03 09:59:36 +02:00
Janek Bevendorff
596d2cf425 Refactor Config.
Replaces all string configuration options with enum types
that can be checked by the compiler. This prevents spelling
errors, in-place configuration definitions, and inconsistent
default values. The default value config getter signature was
removed in favour of consistently and centrally default-initialised
configuration values.

Individual default values were adjusted for better security,
such as the default password length, which was increased from
16 characters to 32.

The already existing config option deprecation map was extended
by a general migration procedure using configuration versioning.

Settings were split into Roaming and Local settings, which
go to their respective AppData locations on Windows.

Fixes #2574
Fixes #2193
2020-05-02 22:30:27 +02:00
Janek Bevendorff
5add01243d Fix tabbar separator visibility
Fixes separator being visible despite multiple tabs being active
when KeePassXC started hidden in the tray.
2020-04-30 14:24:38 +02:00
Janek Bevendorff
5f9b640da1 Fix icon selection highlights
- Change QListView mode to ListMode
- Increase custom icon size
- Reduce grid spacing
- Improve selected icon state composite
2020-04-28 23:35:03 +02:00
Janek Bevendorff
3dcac2c46c Fix DatabaseOpenDialog layout 2020-04-28 23:35:03 +02:00
Janek Bevendorff
34483a1287 Add central colour palette for widget states.
Hard-coded widget state colours (error, warning, health etc.)
are replace by a central palette class, which also takes care
of determining if KeePassXC is in dark or light mode.

Colours expected to be used as background for normal text
were tested for WCAG level A compliance. Health colours were
adjusted for better harmony with the application theme and
tested for sufficient contrast with a colour blindness simulator.
2020-04-28 23:35:03 +02:00
Janek Bevendorff
2f12294639 Fix CategoryListWidget icons
- Correct colouring of selected icon
- Better selection rectangle correction
2020-04-28 23:35:03 +02:00
Jonathan White
7168bcdbe5 Add clipboard-text and refresh icons to resources 2020-04-28 23:35:03 +02:00
Jonathan White
243f68e0e8 Fix button highlighting in multiple dialogs
* Changed style so that only default buttons have full background highlight. This prevents confusion as to which button in various dialogs is the default/desired choice.

* Move password generator popup into static function outside of PasswordEdit so other parts of the program can easily access it.

* QDialog forces 'autoDefault' property on all buttons causing them to obtain background highlight when they are focused. Moved Password Generator outside of a QDialog and forced 'autoDefault' to false on Browser Access Dialog.

* Fixed button ordering in Totp Setup Dialog

* About dialog close button is now the default button
2020-04-28 23:35:03 +02:00
Janek Bevendorff
fbd78037ff Fix icon search path on Linux 2020-04-28 23:35:03 +02:00
Janek Bevendorff
8d2f7832ed Improve theme colour contrast.
Fixes #4407
Fixes #4637

Additional changes:
- Fix reference entry colour being incompatible with dark themes
- Fix QWizard page being too bright in dark mode
- Prevent unfocused wheel scroll changes to theme setting
2020-04-28 23:35:03 +02:00
Jonathan White
1a3dc2145d Stop file checksum compare when stop is called
* When FileWatcher::stop() is called, also stop the timer that checks the file checksum every 30 seconds.
2020-04-27 14:54:57 -04:00
varjolintu
5795051477 Recycle KeePassHTTP settings 2020-04-12 18:15:58 -04:00
Jonathan White
730367557f Ability to disable animation of message widget
* Allows for persistent messages that can change text without disturbing the user interface
* Immediate improvement to KeeShare group edit window
2020-04-12 18:15:15 -04:00
Jonathan White
7ef1ee916b Fix install of libssl and libcrypto on Windows build
* Replace find_library with find_file. CMake likely changed behavior of find_library to exclude dll files.
2020-04-11 14:32:33 -04:00
Janek Bevendorff
d189f9132e
Merge branch 'master' into develop 2020-04-09 18:27:40 +02:00
Ojas Anand
3552ba2a30 Return keyboard focus after saving database edits (#4287) 2020-04-09 18:15:27 +02:00
Janek Bevendorff
e9754efbbe Fix macOS 10.15.4 codesigning crash.
The recent macOS security patch renders our codesigning
"fix" of setting the sandbox entitlement to false twice
unusable. This patch adds a full provisioning profile
and adjusts the signing procedure to not include
entitlements for Qt frameworks.

The patch also changes the app and bundle ID, so granted
accessibility privileges have to be granted again after
installing the update.

Fixes #4398
Fixes #4515
2020-04-09 16:22:42 +02:00
Tezkerek
6128e5d582 [CLI] On Unix, copy to clipboard using wl-clipboard if xclip is not available. 2020-04-09 15:46:44 +02:00
Toni Spets
ef668f552e SSH Agent: Entry context menu control 2020-04-08 13:44:27 -04:00
Jonathan White
d41a37c9bc Fix crash when adding external ssh key to entry 2020-04-08 13:44:27 -04:00
Jonathan White
2022a5e65c Perform one KDF benchmark at a time
* Prevent using double memory when benchmarking Argon2 performance.
* Improve benchmark results by not overusing CPU and memory simultaneously. Parallel benchmarks were causing artificially strained calculations resulting in a lower than desired number of rounds.
2020-04-08 12:52:32 -04:00
Jonathan White
7b25fe9cc6 Set expiration time to Now when enabling entry expiration
* Fixes #3940
2020-04-08 12:52:12 -04:00
Jonathan White
ab9856ee88 Fix issues with HIBP report
* Show horizontal header in results table
* Correctly handle the case when there are no entries to analyze
* Make countToText static
2020-04-08 12:51:46 -04:00
Ojas Anand
f0709d187d Check if hiding notes by default is enabled, hide text if it is
- Check if hide notes setting is enabled and update EntryModel notes'
  data if so
- Fixes #4412
2020-04-04 09:26:51 -04:00
tuxmaster5000
e316a09a79 Change link sequence to allow static versions of libgpg-error and libgcrypt. 2020-04-02 09:17:42 -04:00
varjolintu
0a61aa0d46 Change database root group Uuid 2020-03-31 19:02:50 -04:00
Wolfram Rösler
83ed9a8d4e
Check passwords against the HIBP online service (#4438)
* Fixes #1083

* Add online HIBP checker dialog to the database reports widget. Permission is requested from the user prior to performing any network operations. 
* The number of times a password has been found in a breach is shown to the user.
* If no passwords are breached then a positive message is presented.

* Source of HIBP icon: https://github.com/simple-icons/simple-icons/blob/develop/icons/haveibeenpwned.svg

Authored-by: Wolfram Rösler <wolfram@roesler-ac.de>
Co-authored-by: Jonathan White <support@dmapps.us>
2020-03-29 09:39:06 -04:00
Toni Spets
464e49d329 Add back missing initializers to KeeAgentSettings 2020-03-28 12:07:53 -04:00
Compilenix
5927b6298d
Add DateTime placeholders to AutoType feature (#4409) 2020-03-18 22:00:24 -04:00
louib
e6c2c7ed93
CLI: Cleanup create options (#4313)
* Add ability to create database with an empty password
* Add password repeat check
* Standardize process between `db-create` and `import` commands
* Improve db-create tests with new password repeat

Co-authored-by: Jonathan White <support@dmapps.us>
2020-03-18 21:51:36 -04:00
Janek Bevendorff
b045160e4f Bundle icons using the Qt resource system.
Simplify resource loading logic and enable reproducible builds.
Fixes #2582
2020-03-14 10:13:12 -04:00
Jonathan White
4ff781fa48 Version Bump and Deployment Fixes
* Use KeePassXC executable icon for the start menu shortcut on Windows to prevent the icon from being deleted on installation of a new version. Fixes #4226

* Support improvements to windeployqt in Qt 5.14.1+
2020-03-14 09:48:15 -04:00
Benedikt Rascher-Friesenhausen
b2c2f42f30 Allow defining additional characters for the password generator
See issue #3271 for a motivation of this feature.

This patch adds an additional text input to the advanced view of the password generator.  All characters of this input field (if not empty) will be added as another group to the password generator.  The characters from the excluded field have precedence over the characters from this new field, meaning any character added to both fields will *not* appear in any generated password.  As the
characters from this new field will be added as their own group to the password generator, checking the 'Include characters from every group' checkbox will
force at least character to be chosen from the new input field.

The `PasswordGenerator` class has also been changed so that the `isValid` method returns `true` if only characters from the new input field would be used.

There is a new, simple test that covers the new feature.  While the test only uses ASCII characters, any Unicode characters can be used with the new feature.
2020-03-09 23:35:55 -04:00
Toni Spets
dce9af219f SSH Agent: Integration tests against ssh-agent
Windows testing is currently explicitly disabled due to too many different scenarios to run an agent and MSYS2 having its own.
2020-03-09 23:09:28 -04:00
Aetf
2359742de1 FdoSecrets: only enable the settings page when there is actually a service instance
* Fix #4311
2020-03-09 23:09:12 -04:00
Balazs Gyurak
8ae718b747 Ignore focus when checking toolbar state
* Support copy shortcut when in QTextEdit to prevent inadvertently copying password when interacting with those elements.
2020-03-09 23:08:43 -04:00
Jonathan White
fb5173cebd Remove inline password generator when editing entries
* Always use a pop-up generator to avoid cluttering the user interface and making it clear that a password is being created
2020-03-09 18:03:20 -04:00
Jonathan White
fe1189ea79 Enhance Password Editing Fields
* Remove repeat password on entry edit
* Move show/hide password and password generator buttons into the field as actions.
* Register keyboard shortcut Ctrl+H to toggle password visibility
* Register keyboard shortcut Ctrl+G to open the password generator
* Cleanup code and improve interactions between elements
* Simplify Password Generator button layout; convert advanced mode button to toggle button
* Update GUI tests

* Fixes #4120
2020-03-09 18:03:20 -04:00
Jonathan White
1d7ef5d4eb Move theme detection into Application
* Add function to Application to quickly determine if in light or dark theme
* Add kpxcApp symbol
* Explicitly define main function for GUI tests to improve performance and use custom Application.
2020-03-09 18:03:20 -04:00
Jonathan White
a8c02fdc3c Move database open to async task
* Wrap key transformation in AsyncTask when reading a database. Significantly reduces user interface lockup.
* Replace root group with new group instead of deleting the pointer (fulfills member validity promise).
2020-03-07 16:52:24 -05:00
Jonathan White
91c6e436b3 Dynamically determine database validity
* Check that the database composite key exists, has sub-keys associated with it, and the root group exists.
2020-03-07 16:52:24 -05:00
Jonathan White
7ac292e09b Fix crashes on database save
* Add saving mutex to database class to prevent re-entrant saving
* Prevent saving multiple times to the same file if the database is not marked as modified
* Prevent locking the database while saving. This also prevents closing the application and database tab while saving.
* FileWatcher: only perform async checksum calculations when triggered by timer (prevents random GUI freezes)
* Re-attempt database lock when requested during save operation
* Prevent database tabs from closing before all databases are locked on quit
2020-03-07 16:52:24 -05:00
Jonathan White
6bce5836f9 Fix crash when switching tabs while unlocking 2020-03-07 16:52:24 -05:00
varjolintu
e6186b07e1 Add Created column to Browser Integration at Database settings 2020-03-07 10:05:06 -05:00
Timo Ulich
a6c3c118a7 Add the name of the group to the results for browser extensions
Fixes #466

So it can be displayed in the autocomplete list when more than
one login matches. For users that use groups and have similar names
for multiple logins but organized in different groups
2020-03-07 08:30:17 -05:00
Andrew Meyer
ca471e9986 Display database path in root group tooltip
When mousing over the root group entry, show the file path for the current database.

Fixes #4038
2020-03-07 08:29:53 -05:00
Jonathan White
50e52df04b Fix issues with PopupHelpWidget on Linux and macOS
* Clean up parent alignment code
* Don't hide widget if it currently has focus
* Use Qt::Tool window type on macOS as well. This prevents the popup help from hiding to the background if the main window has focus.
* Fixes #2814
2020-03-05 22:55:49 -05:00
Jonathan White
e26063a872 Fix compile errors when building snap package
* System icons are no longer used eliminating the need to differentiate behavior for the snap package on Linux.
2020-03-05 22:09:29 -05:00
Janek Bevendorff
557736ea5e Add custom light and dark UI themes 2020-03-05 09:24:11 +01:00
Janek Bevendorff
6d2ca74878 Add OSUtils for platform-specific functionality.
Moves MacUtils into a separate sub folder and adds
WinUtils, NixUtils, and OSUtils for platform-native
code on Windows, Unix-like, and generic/all systems.
2020-03-05 09:24:11 +01:00
Michal Suchanek
b9daed2055 Correct issues with hiding and minimizing the MainWindow
The GUI features depend on windowing system used, not just OS.

There is an issue with the WM sometimes producing an event that keepassxc interprets as request to hide the main window just after it is shown. A workaround with immediately firing a timer was implemented. However, there is no guarantee on execution ordering of the timer callback and other application code. Remove the timer and override
show() and hide() on main window to only hide if the window has not been shown recently.

The user can set an option to hide window instead of minimizing when tray icon is enabled. This is not honored in most places where the main windows is minimized. Fix it. This also allows using the tray icon as a workaround for minimization not working under some circumstances in X11.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2020-02-27 23:25:44 -05:00
Jonathan White
eb88b8cc0c Fix clearing search field when using application
* Reset clear timer when manipulating the entry view and opening/closing entries
* Only start the clear timer if there is an active search
2020-02-27 21:22:11 -05:00
Ojas Anand
b188385184
Return keyboard focus after saving database edits (#4287) 2020-02-27 21:21:27 -05:00
Jonathan White
409190c85a
Correct issues with building new SSH Agent fixes 2020-02-23 22:51:18 -05:00
Toni Spets
40ad211f3e Allow toggling SSH Agent integration without restart
- use Q_GLOBAL_STATIC for singleton
- move all configuration to SSHAgent class
- various cleanups to agent code

Fixes #1196
2020-02-23 09:19:34 -05:00
Toni Spets
cb6b0dde27 Fix hiding entry edit pages
Fixes regression caused by 9477437256
2020-02-23 09:19:34 -05:00
varjolintu
9f3516a4da Icon downloader button list check 2020-02-20 20:38:07 +02:00
varjolintu
8dbd5b11eb Code format 2020-02-09 11:28:47 -05:00
varjolintu
8dba308d54 Do not add duplicate entries 2020-02-09 11:28:47 -05:00
humanoid
f227a2d529 Fix browser-like DbTab experience on macOS and Windows
* macOS and Windows browsers do not use `Alt+#` to change tabs. Windows uses `Ctrl` and macOS uses `Command`. Linux uses `Alt`.
* Remove shortcut for `Key+0` and assign `Key+9` as last tab selection
* Streamline tab selection code in MainWindow
2020-02-09 11:09:45 -05:00
Carlo Teubner
f62e0534a2 Fixes for minor issues found by static analysis
Mostly style issues.

I used the following tools to find most of these:

- lgtm.com
- clang-tidy
- cpplint
- cppcheck
2020-02-02 08:46:58 -05:00
Jonathan White
c663b5d5fc Add braces around single line statements
* Ran clang-tidy with "readability-braces-around-statements" to find missing braces around statements.
2020-02-02 08:46:18 -05:00
Wolfram Rösler
c427000184 Remove result cache from the HealthChecker class
The way the class is currently being used, the cache never does
anything (because evaluate is never invoked twice for the same
entry), so according to YAGNI it has to go.

Fixes #551
2020-02-01 09:30:12 -05:00
Wolfram Rösler
a81c6469a8 Implement Password Health Report
Introduce a password health check to the application that evaluates every entry in a database. Entries that fail  various tests are listed for user review and action. Also moves the statistics panel to the new Database -> Reports  widget. Recycled entries are excluded from the results.

We now have two classes, PasswordHealth to deal with a single password and HealthChecker to deal with all passwords of a database.

Tests include passwords that are expired, re-used, and weak.

* Closes #551

* Move zxcvbn usage to a centralized class (PasswordHealth)  and replace its usages across the application to ensure standardized interpretation of entropy calculations.

* Add new icons for the database reports view

* Updated the demo database to show off the reports
2020-02-01 09:30:12 -05:00
James Ring
71a39c37ec
Add --username option to Clip command. (#3947)
* make Clip accept an attribute name

This allows users to copy arbitrary attributes (e.g. username, notes,
URL) to the clipboard in addition to the password and TOTP values.

* update Clip manpage

* Add findAttributes to CLI utils

* Use case-insensitive search in Show command.

* Use case-insensitive search in Clip command.

Co-authored-by: louib <L0U13@protonmail.com>
2020-01-30 15:46:48 -05:00
Balazs Gyurak
06e0f38523 CLI: Fix XML encoding when export database
Add write function to TextStream
Fix #3900
2020-01-29 20:51:53 -05:00
Aetf
792c1c94f7 FdoSecrets: check and show PID and executable for existing secret service process 2020-01-29 19:20:55 -05:00
Jonathan White
0383aa104c Improvements to confirm access dialog
* Disable access to entries immediately within the dialog
* Use checkboxes instead of row selection
* Add button to deny all access immediately
2020-01-29 19:20:31 -05:00
Wolfram Rösler
97b034dbcb Ignore system icon theme, always use our own icons
With the Material Design icons, any other icons brought in through
the system icon theme will look inconsistent.

Also remove the KEEPASSXC_IGNORE_ICON_THEME environment variable
(which was introduced during development of the new icons to
disable the system icon theme and is thus no longer needed).

Fixes #475
2020-01-29 19:18:54 -05:00
James Ring
94b45ea16f
Use db-create as Create::name (#4263)
Fixes a name mismatch introduced in
b78ca924fd.
2020-01-29 15:18:48 -05:00
louib
0b6d9cb472 CLI: set decryption time on create.
Added an option to set the target decryption time on database creation
for the CLI create command. This required some refactoring, in
particular the extraction of the min, max and defaut decryption times in
the `Kdf` module. Some work was done to allow changing those constant
only in the `Kdf` module, should we ever want to change them.
2020-01-27 23:00:34 -05:00
Jonathan White
a41c26e9cd Cleanup UI files
Removes unnecessary &amp; from strings in settings widgets. These cause confusion and complicate translation. They are unnecessary as all dialogs allow efficient tabbing between elements.

Also add colons after several settings with input boxes and remove a hard stop.

Improve wording of strings based on translator feedback.

Fix case sensitive matching of CLI Export.
2020-01-27 22:58:19 -05:00
Toni Spets
4dee16c9fa SSH Agent: SSH_AUTH_SOCK override and conn test
Fixes #3795
2020-01-27 22:57:57 -05:00
Toni Spets
6fc7be78ea Implement SSH key file path env substitution
Supports all platforms, including Windows with %FOO% syntax.

Fixes #3523
2020-01-27 22:57:31 -05:00
Jonathan White
91755fa83a
Fix compile error on certain platforms 2020-01-27 20:49:52 -05:00
JulianVolodia
06e5f19fab Enable browser-like DbTab experience (Alt + Nums)
* Pressing ALT+1-9 goes to 1-9 tab
* Pressing ALT+0 goes to the last tab
2020-01-27 17:55:35 -05:00
Toni Spets
e24a858f39 SSH Agent: Refactor entry and agent key management
- Remove duplicate code to load a key (EditEntryWidget & SSHAgent)
 - Refactor all key loading and saving to KeeAgentSettings
 - Depend only on Entry to allow future CLI expansion
2020-01-27 17:40:02 -05:00
louib
c97ee5395b Small cleanup in cli/Show.cpp 2020-01-26 23:50:53 -05:00
louib
b78ca924fd Adding db-info CLI command. (#4231)
This adds a basic db-show CLI command, to display
the information related to a database.
2020-01-26 23:44:31 -05:00
louib
c8ab3b5f4f Removing QColor (from Qt::Widgets) from core modules. (#4247) 2020-01-26 21:38:43 -05:00
Kjell Braden
6ff3e8801d retrieve login1 session object from manager (#3339) 2020-01-25 09:56:16 -05:00
Andrey Izman
796b5ceacb Fix closing tag typo 2020-01-22 17:31:46 -05:00
louib
b34a8f9d94 Use stderr for help text on error.
Also not sure why qCritical was used instead of and stderr output
stream. Added translation on the invalid command string.
2020-01-20 16:15:08 -05:00
Janek Bevendorff
b2fd7f6d54
Merge branch 'master' into develop 2020-01-19 21:44:25 +01:00
Jonathan White
dc37537797 Prevent proxy host from blocking application shutdown
* Fix #4079 - proxy host would get stuck trying to read characters from stdin. Switch to "readsome" which does not block if there are not enough characters to read. Added a longer delay to slow the checking loop down.
2020-01-19 18:13:43 +01:00
varjolintu
08a911466e Simplify the comparison 2020-01-19 18:13:12 +01:00
varjolintu
d2e76058cd Fix base domain matching 2020-01-19 18:13:12 +01:00
Jonathan White
6f9907a3cb Fix clearing clipboad on Gnome
* Prefer clearing clipboard by explicitly setting the clipboard to an empty string. Qt's QClipboard::clear() method is unreliable under X11 environment.

* Fixes #4126
2020-01-16 10:54:04 -05:00
Jonathan White
0d3eb047c7 Prevent crash when all entries are deleted from a group
* Fix #4093 - The first entry in the list is selected after deleting an entry
* Prevents crashes due to dangling pointers held by the Entry Preview Widget when entries were deleted.
* Improve GUI tests to ensure this new behavior occurs.
2020-01-16 10:53:41 -05:00
varjolintu
6cde2b83e8 Add support for Microsoft Edge browser 2020-01-16 10:53:02 -05:00
Jonathan White
9da07f2f66 Don't mark cmd:// urls as invalid
* Due to the complexity of cmd:// type url's, avoid trying to parse them for validity once the initial scheme is entered.

* Fixes #4138
2020-01-13 15:29:02 -05:00
varjolintu
460732097c Add empty path to URL when needed 2020-01-12 18:43:02 -05:00
Wolfram Rösler
84e3925e7b Remove "Create new database" from tool bar
It's used extremely rarely, having it in such a prominent position
in the tool bar isn't justified. Also, with the Material Design
icons, its tool bar icon can easily be confused with "create new
entry".

Fixes #475
2020-01-11 19:00:15 +01:00
Wolfram Rösler
05ef937e92 Use Qt::AA_UseHighDpiPixmaps on all platforms
... not only on Linux, in order to prevent icons from being fuzzy.

Fixes #475
2020-01-11 19:00:15 +01:00
Wolfram Rösler
2ca8dbebea Show dark KeePassXC icon in the system tray menu
for the "Toggle Window" menu item. It matches the other
(Material Design) icons much better than the colored
icon.

Fixes #475
2020-01-11 19:00:15 +01:00
Wolfram Rösler
36f92b7649 Replace application icons with Material Design icons.
Use the following to run KeePassXC with the icons from the
source code, ignoring the operating system's Qt icon theme:

```
KEEPASSXC_IGNORE_ICON_THEME=1 keepassxc
```

The patch further adds a script `makeicons.sh` that re-creates KeePassXC
icons from the Material Design icon set and can be used for easily
updating icons in the future. Instructions are in the script.

Fixes #475
2020-01-11 19:00:15 +01:00
Janek Bevendorff
470838f21c
Merge branch 'release/2.5.3' into develop 2020-01-11 18:28:44 +01:00
Janek Bevendorff
247ebf5a35 Ensure challenge-response key buffer is properly cleared.
The challenge-response key buffer is explicitly cleared
before the key transformation if no such key is configured
to ensure one is never injected into the hash even if the
database had a challenge-response key previously.

This patch also adds extensive tests for verifying that a
key change will not add any expired key material to the hash.

Fixes #4146
2020-01-11 11:16:03 +01:00
Jonathan White
cba8947ee8 Prevent unnecessary merge requests on intermittent network shares
* Fixes #4118
2020-01-10 20:10:35 -05:00
Jonathan White
39a7ce58b9 Prevent crash if Auto-Type performed on new entry
* Check that entry's group is not nullptr
* Fixes #3967
2020-01-10 14:04:57 +01:00
Jonathan White
3fdafc6d25 Prevent crash if Auto-Type performed on new entry
* Check that entry's group is not nullptr
* Fixes #3967
2020-01-09 14:21:22 +01:00
Jonathan White
8ded3bdba2 Merge branch 'master' into develop 2020-01-04 09:10:25 -05:00
Jonathan White
7250fd9313 Fix TOTP Dialog not closing on lock 2020-01-03 18:08:24 -05:00
Jonathan White
181ad76ec9 Use new TOTP structure when importing 1Password Vault
* Fixes #3999
2020-01-03 18:08:24 -05:00
Jonathan White
9ab531473a Fix AutoOpen with key file only databases
* Fixes #3931
2020-01-03 18:08:24 -05:00
Jonathan White
87af012a97 Hide snap browser warning label on non-Linux OS
* Fixes #3707
2020-01-03 18:08:24 -05:00
Jonathan White
db032831e0 Choose a better monospace font on macOS
* Fixes #1917
2020-01-03 18:08:24 -05:00
Jonathan White
2a51f2cba5 Fix compiler issues with Qt 5.14
* Remove deprecation warnings when not doing a DEV_BUILD. Qt 5.14 introduced several deprecation flags on basic function calls in QList and QSet that would require several #pragma ignores. Assuming this was in preparation to Qt 6.0.

* Remove unnecessary assert in PasswordEditWidget that was hit in macOS debug builds.
2020-01-03 18:08:24 -05:00
Aetf
adb29dd0e4 FdoSecrets: only emit completed signal when the action actually finishes 2020-01-02 08:05:11 -05:00
Aetf
af14929af1 FdoSecrets: fix searching of entries with special characters in attributes 2020-01-02 08:04:42 -05:00
Peifeng Yu
3ffeab4c41 FdoSecrets: fix all exposed entries are returned if search with empty terms 2019-12-27 23:20:45 -05:00
Jonathan White
2fab4d576a Merge branch 'release/2.5.2' into develop 2019-12-27 19:38:44 -05:00
Aetf
90cdfc4a6d FdoSecrets: fix service not registered if start with the plugin enabled 2019-12-27 18:47:24 -05:00
Aetf
12efb281f8 FdoSecrets: fix when exposing groups, the root group is considered in recycle bin 2019-12-27 18:47:24 -05:00
Aetf
98ff9f1e77 FdoSecrets: cleanup all connections when database is replaced due to locking, fix #4004 2019-12-27 18:47:24 -05:00
Aetf
1ae7e72aa8 FdoSecrets: remove half created entries if the creation fails 2019-12-27 18:47:24 -05:00
Aetf
a518f4306d FdoSecrets: UI improvements
- Use proper model for database and session in settings page
- Fix button text (unlock/lock) not changed according to the database locking status
- Fix button icons not present on icon themes other than Breeze
- Fix the disconnect button may got clipped when new session opens
2019-12-27 18:47:24 -05:00
Wizz
0654ffc117 CLI: Fix keyfile from/to parameter collision in merge command
Rename 'k' to 'f' because 'k' is already used to specify the key for the target database of the merge

* Remove short -f option from keepassxc-cli.1
* Remove -f option from keepassxc-cli merge
* Add test cases covering cli options for merge
* Add functional test for merge with keys
2019-12-21 17:39:50 -05:00
varjolintu
c0796d8fb1 Add option to use entry only for HTTP Basic Auth 2019-12-21 17:28:27 -05:00
James Ring
26afdb39d3 Fix crash upon exiting interactive mode if there is no current database. 2019-12-21 10:09:22 -05:00
Chih-Hsuan Yen
794cc1eeab Partial fix for building on Mac OS X < 10.12
This commit reverts #3357.

The previous PR is for the new symbol NSEventMaskKeyDown, which is
introduced in #3347. In #3794, #3347 is reverted, so the workaround
in #3357 is no longer needed. Furthermore, it causes build failures
on 10.11 (#3932) as the header file for type NSEventMask is removed
in #3794, too.

Note that this is not a complete fix. A complete patch can be found
at [1]. In MacPorts, the OS version for building a package is the same
as the OS that installs it, so #ifdef can be used to replace @available.
The latter language feature is not available until Xcode 9.

With the patch mentioned in the previous paragraph, KeePassXC 2.5.1
can be built on Mac OS X 10.9 or newer.

Ref: #2899

[1] de1bb703ad/security/KeePassXC/files/patch-old-mac.diff
2019-12-21 09:25:56 -05:00
Carlo Teubner
c70ebe6dce Fix memory leaks (mostly) in tests (#3922)
This makes most tests run successfully with asan.

The GUI tests still have a bunch of leaks, some from library code, and
some that look real but which I didn't immediately manage to figure out.

* TestOpVaultReader: use QSharedPointer
2019-12-21 09:25:17 -05:00
varjolintu
c0f29cc790 Show UI warning for invalid URLs 2019-12-21 09:22:16 -05:00
varjolintu
663393d994 Remove extra check for additional URLs 2019-12-20 22:17:30 -05:00
Jonathan White
ed0b76813d Merge branch 'release/2.5.2' into develop 2019-12-15 00:11:02 -05:00
Jonathan White
8e76c30dd1 Prevent reloading database while editing an entry or group
* Fix #3933 and  fix #3857. Interaction with entries and groups is disabled while the database is being reloaded or saved to prevent changes from occurring. Prevent the database from being reloading if an entry or group is currently being edited.

* Fix #3941 - Only notify components when the database file actually changes (determined by checksum). This prevents spurious merge requests when the file is merely touched by another service (e.g., DropBox).

* Fix code format of ElidedLabel.cpp
2019-12-14 21:26:12 -05:00
Jonathan White
f9cb2bd5df Correct multiple issues with database saving
* Mark the database as clean after fully completing the file save operation INSTEAD of when merely writing the database to a file.

* Stop the modified timer when marking the database as clean, this prevents latent erroneous modified signals from being emitted.

* Do not restart the modified timer after a new change is detected while it is still running.
2019-12-14 21:26:12 -05:00
Jonathan White
7b95867378 Code format fixes 2019-11-29 13:45:14 -05:00
Aetf
6dd9702b79 FdoSecrets: handle the exposed group being moved to recycle bin 2019-11-29 08:37:19 -05:00
Balazs Gyurak
9363123047 Add ability to hide a protected attribute after reveal 2019-11-23 10:07:39 -05:00
Balazs Gyurak
c0b1c9e106 Run code formatter 2019-11-23 10:07:39 -05:00