Commit Graph

365 Commits

Author SHA1 Message Date
Jonathan White
f2aa32c7b0 Add direct write save option
* Closes #6335
* Modify application settings presentation to  allow for alternative saving strategies
* Transition Database::save calls to using flags to control saving behavior. Reduces boolean flags on function call.
* Made direct write save option a local setting to prevent unintentional carry over between platforms.
2021-10-09 11:12:25 -04:00
osx user
2514c1d5c5 feature/AutoTypeTOTP 2021-10-02 00:04:03 -04:00
Allen Wild
53dcafaa58 Allow selecting any open database in unlock dialog
* Closes #2322

* Show locked databases in tabbed interface in unlock dialog for browser and auto-type workflows.

* Make the DatabaseOpenDialog window Application-Modal so that it blocks input to the main UI when the dialog is open. This reduces corner cases by avoiding the possibility of databases getting closed or unlocked
behind the open dialog.
2021-08-29 16:02:40 -04:00
Janek Bevendorff
93f0fef1e1 Improve and secure attachment handling (fixes #2400).
Externally opened attachments are now lifecycle-managed properly.

The temporary files are created with stricter permissions and entirely
random names (except for the file extension) to prevent meta data leakage.

When the database is closed, the files are overwritten with random
data and are also more reliably deleted than before.

Changes to the temporary files are monitored and the user is asked
if they want to save the changes back to the database (fixes #3130).

KeePassXC does not keep a lock on any of the temporary files, resolving
long-standing issues with applications such as Adobe Acrobat on Windows
(fixes #5950, fixes #5839).

Internally, attachments are copied less. The EntryAttachmentsWidget
now only references EntryAttachments instead of owning a separate copy
(which used to not be cleared properly under certain circumstances).
2021-08-22 17:09:21 -04:00
hollow-owl
af9eb6d6b1 Select entry above deleted entry
* Fix #6304 - Don't cause the list view to scroll to the top when deleting any entry in the list.
2021-08-22 17:08:29 -04:00
osx user
746276edea Enhance last used directory settings
* Use hash based storage for last used directories instead of a key/value for each type
* Explicitly declare certain operations as sensitive and follow the "Remember Last Database" setting for those.
* Introduce database backup directory location (close #6619)
2021-08-22 16:47:42 -04:00
Stuzer05
304cb44d0d Add group clone action
Close #3796
2021-08-08 16:54:10 -04:00
peter
6b14b5dc27 Optimize includes across code base 2021-07-13 22:08:33 -04:00
Xavier Valls
6acd0b25ae
Add a context menu entry to delete entries from health check reports (#6537)
* Closes #4986 - Allow deleting entries from the reports view
* Closes #4533 - Exclude & delete multiple entries in a report
* Also allow deleting selected entries using the delete key
* Introduce GuiTools namespace to collect shared GUI prompts and actions
* Add functionality to HIBP report to mirror health check report

Co-authored-by: Jonathan White <support@dmapps.us>
2021-05-31 10:40:20 -04:00
Aetf
81a66c439c
Properly block modified signal during Database destruction (#6438)
fixes #6393
2021-05-27 21:50:15 -04:00
Lukas Rytz
cc6f5c3226 MinimizeAfterUnlock also when unlocking through browser
The MinimizeAfterUnlock setting added in #3439 closes the main window
after unlock. However, when the unlock is triggered through
KeePassXC-Browser, a password dialog is shown on top of the main window
and the main window remains open after the unlock. This is fixed
in this commit.
2021-05-15 09:45:26 -04:00
Jonathan White
8c61a73bb0 Show search bar when toolbar is hidden or overflow
* Fix #505 - always show the search bar when the search keyboard shortcut is pressed. If the toolbar is in overflow, the toolbar will be expanded automatically and search focused. If the toolbar is hidden it will be shown and expanded if necessary. When searching is canceled or the down arrow is pressed (to select the first entry) the toolbar will be set back to it's previous configuration.
2021-05-15 09:11:38 -04:00
Xavier Valls
7b7f52c8af
Introduce security option to enable copy on doubleclick (#6433)
* Fix #1575 - option is disabled by default
2021-04-24 11:35:01 -04:00
Jonathan White
7ce35f81de
Cleanup entry level Auto-Type menu
* Show the sequence that will be typed when performing the default action
* Combine default sequence action with Username / Password options
* Fix #4939 - confirm prior to performing entry level auto-type if "Always Ask Before Auto-Type" is enabled
2021-02-21 16:33:54 -05:00
Jonathan White
f3d88fbd36 Address translation feedback from Transifex 2021-02-19 18:37:33 -05:00
Aetf
9a8a5a0006
FdoSecrets: Major Refactor and Code Consolidation (#5747)
* Fixes #3837

* Change objects to use DBusMgr rather than separate adaptors
  - Update all DBus invokable methods to new parameter order
  - Change all usage of DBusReturn to simpler DBusResult
  - Use DBusMgr to handle path and service registration
  - Remove adaptor/*
  - Set path in DBusObject
  - Unregister service when service is destroyed
  - Restore handling of invalid QVariant in prompt complete signal
  - Clean up meta type registration
  - Move dbus related file together
  - Convert to QSharedPointer as much as possible
  - Fix mapping of the Delete method
  - Handle dbus property get all

* Add per-client states
  - Move cipher negotiation to DBusClient
  - Show list of clients instead of sessions in the settings page
  - Add settings for confirmation of accessing items
  - Fix infinite recursion when client disconnected
  - Use optional explicit DBusClient parameter instead. This makes accessing 
    the client info in an async context explicit, and thus prevent accidental 
    assertions in prompts.

* Improve User Interface
  - Add per-item access confirmation (if enabled)
  - Remove the "disable for site" button for the access control dialog
  - Improve the text on the settings page to be more consistent
  - Fix disconnect buttons in settings page not working
  - Make the unlock prompt method nonblocking

* Fix and cleanup unit tests
  - Use QTRY_COMPARE when checking signal spies, as dbus signals are threaded
  - Fixes in meta type registration and type conversion
  - Remove QStringLiteral in COMPARE macros, making diff output readable
  - Add testing for remembering auth decision
2021-02-05 15:07:59 -05:00
Jonathan White
61b85183f9
Merge branch 'master' into develop 2021-01-31 17:04:38 -05:00
Janek Bevendorff
86278311d2
Merge branch 'master' into develop 2021-01-12 18:24:59 +01:00
Bernhard
260c84ccf0
Fix reSelect entry & group on loadDb 2020-12-20 09:12:59 -05:00
Jonathan White
f0204dbb10 Fix closing modal dialogs on database lock
* Fixes #5719, Fixes #5744
2020-12-12 12:31:43 -05:00
Bernhard Berg
a6f01349e8
Redo 'delete entries no confirm' functionality & unit-tests (#5812)
* Fixes #5232
2020-12-12 12:14:18 -05:00
Janek Bevendorff
c9d1512748
Revert "Add "move to recycle bin without confirmation" setting"
This reverts commit de44764efa.
2020-12-11 13:11:42 +01:00
Bernhard Berg
de44764efa Add "move to recycle bin without confirmation" setting 2020-12-11 00:15:24 -05:00
Bernhard
c9e7ffadad Fix reSelect entry & group on loadDb 2020-12-11 00:11:18 -05:00
Jonathan White
59b8b13146 Force set entry preview after search ends
* Fixes #5093
2020-10-19 21:31:42 -04:00
Jonathan White
39f1504ca2
Mask password placeholder in command execution dialog
* Fixes #4463
2020-10-11 20:08:27 -04:00
Jonathan White
12782161bc
Move Hide Usernames/Passwords into view menu
* Fixes #4982
* Removed a lot of redundant and passthrough code
2020-10-11 20:08:27 -04:00
Jonathan White
c67ebf19d4 Fix AutoOpen IfDevice matching, again
* Fix case where only exclusions are entered (eg, !COMPUTER1, !COMPUTER2) which should allow opening the database on every other computer name.
2020-09-05 09:00:05 -04:00
Jonathan White
8a7bdd5b95 Change actions for F1-F2-F3 keys
* Fixes #5037
* F1 focuses group view, if already focused it opens the focused group for editing
* F2 focuses entry view, if already focused it opens the focused entry for editing
* F3 focuses search
2020-08-19 20:24:40 +02:00
Jonathan White
c538f0b907 Fixup saving non-data changes on database lock
* Fix #5107 
* Change setting for non-data changes to Auto save on database lock (or not) instead of marking modified.
* When enabled, database will be auto-saved if there are only non-data changes, but will not prompt the user if saving has failed.
* When disabled, database will not auto-save if there are only non-data changes (same behavior as 2.5 and below) and will not mark the database dirty.
2020-08-08 15:40:00 -04:00
Jonathan White
7f2efd3193 Fix Search and KeeShare banner style 2020-08-08 14:10:49 -04:00
Jonathan White
2f422ab719
Fix and document AutoOpen
* Fix #5017 - ifDevice -> IfDevice and correct behavior of negated hostnames
2020-08-01 09:01:12 -04:00
Anees Ahmed
1d0523ec21 Add option to Auto-Type just the username/password
Fixes #4444

Some websites these days do not present both the "username" and the "password"
input box on the same webpage (e.g. Google, Amazon). So no custom sequence is
possible to enter both the said attributes in one go.

So, two new context menu actions have been added:
1.  Perform Auto-Type of just the username
2.  Perform Auto-Type of just the password

These context menu actions are analogous to "Copy username" and "Copy
password", except it avoids sending all characters via clipboard.

* Create a sub-menu in the Context Menu of Entry.
* The sub-menu offers the following sequences:
    - {USERNAME}
    - {USERNAME}{ENTER}
    - {PASSWORD}
    - {PASSWORD}{ENTER}
2020-07-21 18:22:47 -04:00
Jonathan White
e02a63b061 Prevent crash if focus widget gets deleted during saving
* Fixes #4966
2020-07-18 09:15:45 -04:00
Jonathan White
3b459813ed Replace "Master Key" with "Database Credentials"
Definitions:
* Database Key - Cryptographic hash used to perform encrypt/decrypt of the database.

* Database Credentials - User facing term to refer to the collection of Password, Key File, and/or Hardware Key used to derive the Database Key.

Changes:
* Remove the term "master" and "key" from the user's lexicon and clarify  the code base based on the definitions above.
* Clean up wording in the UI to be clearer to the end user.
2020-07-02 17:39:45 -04:00
Jonathan White
f129768f07 Improve AutoOpen
* Add support for 'ifDevice' feature, closes #2871
* Resolve placeholders for username and password to support references, fixes #2078
* Add support for open databases from an entry when the url starts with 'kdbx://'. Uses the same syntax as AutoOpen. Closes #1536.
2020-06-04 10:03:40 -04:00
Toni Spets
a83345d136 SSH Agent: Reset settings when KeeAgent.settings is removed
Fixes #4594
2020-05-23 11:30:31 -04:00
Andrew Meyer
98566fec83 Correct 'save as' behavior to ensure file path remains valid
Copy necessary saving sequence from the save function into saveAs function to prevent inconsistencies when saving to a new file.
2020-05-23 08:44:08 -04:00
Holger Böhnke
eb198271ac Add natural sort of entry list
Introduce a third unsorted status that shows entries in the order they occur in the KDBX file.

* Add keyboard shortcut Ctrl+Alt+Up/Down to move entries up and down in sort order
* Add entry context menu icons to achieve movement up/down
* Only show menu icons when in natural sort order
* Add Material Design icons for moving up/down

* Add feature to track non-data changes and force a save on exit to ensure they are not lost when locking a database. This allows users to make entry movements and group expand/collapse operations and not lose that state.

Remove saveas
2020-05-22 12:13:20 -04:00
stingray21
d863496f62 Add DB_DIR placeholder for autoopen urls 2020-05-21 14:13:18 -04:00
Toni Spets
a1b4a3f8b7 SSH Agent: Track which database owns a key for remove-on-lock
Fixes #4532
2020-05-19 09:23:41 -04:00
Andrew Meyer
45848c3f61 Implement 'Save Database Backup' option
Add an option in the 'Database' menu to save a backup of the current database.

Add unit test for saving database copy

* Open a test database, mark it as modified, and save a copy
* Fail if the copy is not a valid database
* Fail if the original database is saved
* Fail if the original database is no longer marked as modified
2020-05-16 11:00:27 -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
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
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
Toni Spets
ef668f552e SSH Agent: Entry context menu control 2020-04-08 13:44:27 -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
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