0
0
mirror of https://github.com/keepassxreboot/keepassxc.git synced 2024-09-20 04:12:15 +02:00
Commit Graph

2940 Commits

Author SHA1 Message Date
Bernhard
9cf93111d6 Fix heap-use-after-free & error-msg output in keepassxc-cli
* Fixes #5367
2020-09-04 21:15:03 -04:00
piegames
6a35bbea2f Add browser service search for entries via UUID 2020-09-02 23:19:43 -04:00
Jonathan White
1c27dccabb Use selected settings in password generator on load
* Fixes #5336
2020-09-01 07:58:16 -04:00
Jonathan White
f17fce9461 Fix Paperclip and Totp columns not saving state
* Work around Qt bug that causes isSectionHidden to return false after restoring state due to the section actually only being set to 0 width.
* Fixes #5317
2020-09-01 07:57:56 -04:00
Jonathan White
f947c96462 Improve CSV export and import capability
* Fixes #3541
* CSV export now includes TOTP settings, Entry Icon (database icon number only), Modified Time, and Created Time.
* CSV import properly understands time in ISO 8601 format and Unix Timestamp.
* CSV import will set the TOTP settings and entry icon based on the chosen column.
2020-09-01 07:57:31 -04:00
Jonathan White
639e44e182 Fix opening opvault on macos
* Fixes #4069 and closes #5002
2020-09-01 07:57:15 -04:00
Reza Jelveh
aedc45abd5 The Database Open Dialog should use the window flag QT::Dialog
Currently the Open Dialog does not behave like a dialog. In Unix it
means that the EWHM hints are not set correctly therefore the window
manager doesn't properly set the floating window style.

It should also allow removing Mac/Windows/Unix custom conditional code.
2020-08-31 23:36:10 -04:00
Laurent Erignoux
f49f62d3be Add a best option to CLI command clip (#4489)
The best option copy the password from the best match if only one matching entry exists.

Adding clip best option documentation

Adding unit tests on the new clip --best option
2020-08-31 23:06:27 -04:00
fpohtmeh
bbdfbe64da Add ability to rename attachments
* Closes #4758
2020-08-31 23:06:10 -04:00
Wolfram Rösler
6b96806914 HTML Export: Don't waste horizontal space
The previous version left a lot of white space to the
right of the table, meaning that more pages needed to
be printed for a paper backup. The table has been
reorganized. HTML Backup for the demo.kdbx database
is now down from 6 to 3 pages.
2020-08-31 20:17:30 -04:00
clonejo
656e6d289a Don't ask when removing an empty URL
There is no harm to deleting an empty URL from the browser integration
URL list when the user never set a value. It's a bit annoying, actually.
2020-08-31 20:16:33 -04:00
Bernhard
745f1befe9 Allow hiding expired entries from Auto-Type
* Add setting to hide expired entries from Auto-Type
* Expired entries will not be shown in selection dialogs or be auto-picked for use
* Fixes #1855
2020-08-30 08:06:22 -04:00
Jonathan White
c0c0ef9fe8 Improve button hover effect for checked buttons 2020-08-19 20:25:18 +02: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
Sami Vänttinen
0cc2c83525
Add command for retrieving the current TOTP (#5278) 2020-08-17 06:17:58 -04:00
Jonathan White
a5208959c4 Fix excessive memory usage by icons
* Fixes #5240
* Limit size of icons being loaded to prevent excessive memory usage in some cases
* Fix loading database icons, previous method would just overwrite the same pixmap and not actually provide caching.
2020-08-16 22:40:57 -04: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
fd7daf4c89 Fix removing open databases setting
* Fixes #5065
2020-08-08 15:39:28 -04:00
Jonathan White
7f2efd3193 Fix Search and KeeShare banner style 2020-08-08 14:10:49 -04:00
Murdoc Bates
a79afd6580 Update "Open Auto-Type help webpage" URL 2020-08-08 14:10:27 -04:00
Jonathan White
51f3014028 Only display domain name in browser access confirm dialog
* Prevents dialog from growing in width if there is a really long url requesting access.
2020-08-07 06:24:33 -04:00
cl0ne
60317ffadd Set decoration size for category list items
Fixes #5164
2020-08-06 22:10:46 -04:00
Jonathan White
1f4c7cc22b Improve Password Generator Widget UI/UX
* Fix #5098 - Ensure advanced mode settings are saved distinctly from simple mode settings
* Make selected character groups pop out in the UI
* Improve layout of character options
2020-08-06 18:09:45 -04:00
Janek Bevendorff
a32147182a
Switch to classic if theme set to auto and high contast mode is on.
The light and dark theme don't respond to Windows's high contrast
accessibility mode, so when the theme is set to "auto", we
default to "classic" instead of "light".

Fixes #5044
2020-08-01 09:01:12 -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
Jonathan White
b206cdba92
Fix entry level Auto-Type window hiding
* Fixes #4962
2020-08-01 09:01:12 -04:00
Jonathan White
9042ef7557
Correct scaling on Linux and other minor fixes
* Fixes #5081 - Initialize MessageWidget::m_animate prior to use

* Fixes #5021 - Don't change tray icon type with unfocused mouse wheel

* Fixes #5029 - Only use HighDpiScaleFactorRoundingPolicy::PassThrough on Windows platforms. Prevents significant scaling bugs on Linux. MacOS does not support fractional scaling.
2020-08-01 09:01:12 -04:00
Ojas Anand
0aa029d548
Clear clipboard on database lock
- Always store the last copied text
- clearCopiedText will always clear clipboard
  regardless of timer state
2020-08-01 09:01:12 -04:00
Jonathan White
c511cb518c Fix error background color for URLs 2020-07-27 21:43:40 -04:00
Jonathan White
a88fe61a7b Minor theme fixes
* Support mouse hover color change for QPushButtons.
* Fix #5040 - don't enforce standard palette when in classic theme mode
2020-07-27 21:43:40 -04:00
fpohtmeh
004f5d407f Open and save attachment in readonly mode
* Fix #2039
2020-07-22 21:57:45 -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
varjolintu
f73855a7f2 Adjust matching with best-matching credentials enabled 2020-07-21 07:29:02 -04:00
Anton Vanda
c2bdb48bc6 Fix 'db-info' command name to show it right in 'help'
* Fixes #5139
2020-07-20 21:20:21 -04:00
Ingo Heimbach
10dc859231 Add support for the Xfce screensaver 2020-07-20 21:18:51 -04:00
tuxmaster5000
fb7cc673ac Add Qt translation dir for RPM packaging 2020-07-18 18:21:33 -04:00
Jonathan White
e1a264825a PasswordEdit use CTRL modifier on all platforms
* Fixes #5114
2020-07-18 18:21:20 -04:00
Jonathan White
d6857e654f Fix minor TOTP issues
* Fix #5105 - prevent divide-by-zero segfault due to invalid TOTP settings
* Clear TOTP settings if attributes are removed
2020-07-18 09:59:02 -04:00
Toni Spets
747be8d629 SSH Agent: Always forget all keys on lock
Fixes #5016.
2020-07-18 09:24:40 -04:00
Toni Spets
7c39907251 Substitute tilde with USERPROFILE on Windows
The substitution is now more shell-like and tilde is only replaced
from the beginning of the path if it is trailed by a slash.
2020-07-18 09:24:22 -04:00
alcroito
005d9d368f
Skip referenced passwords in Health check report
Fixes #5036
2020-07-18 09:18:19 -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
4a917d171d Improve restart requests
* Fixes #4959
* Ask to restart when changing languages in application settings.
2020-07-15 07:10:54 -04:00
Janek Bevendorff
2fe74c2947 Reset icon theme name before calling QIcon::fromTheme().
qt5ct randomly resets the active Qt icon theme to "",
resulting in empty or wrong icons.

See https://sourceforge.net/p/qt5ct/tickets/80/

Fixes #4963
2020-07-10 14:29:39 +02:00
Adam Crowder
4f1d8943d6 fix slot detection on yubikeys
Signed-off-by: Adam Crowder <adam@adamcrowder.net>
2020-07-09 21:37:10 -04:00
Jonathan White
13c86cbdc5
Fix auto-restart when a space is in the file path 2020-07-06 21:09:59 -04:00
Jonathan White
9bf0d7680e
Update About dialog
* Patreon additions and code contributors
2020-07-06 18:47:43 -04:00
varjolintu
9b63e6a289 macOS: Fix hiding window after using database unlock dialog
* Properly hide window after Browser Integration and Auto-Type unlock, if needed
* Fix #4904
2020-07-05 20:04:35 -04:00
Shun Sakai
9dde9314e8 Change to generate man page from AsciiDoc 2020-07-05 14:54:31 -04:00
Jonathan White
124739fde2 Switch to Asciidoctor based documentation 2020-07-05 14:54:31 -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
60bb593228 Fix layout of CSV Import Widget 2020-06-29 09:54:35 -04:00
Jonathan White
ef7a4288ae
Prevent crash on restart 2020-06-29 08:23:51 -04:00
database64128
790b3382a3 Call QGuiApplication::setHighDpiScaleFactorRoundingPolicy to fix #2815 2020-06-28 23:07:22 -04:00
Jonathan White
05a0df799e Fix auto-start settings on Windows 2020-06-28 16:25:26 -04:00
Jonathan White
9c0fa376a1 Fix Touch ID timeout not being set correctly
* Fixes #4885
2020-06-28 16:25:14 -04:00
Jonathan White
247882eb54 Remove redundant call to update tray icon during startup
* Fix #4768
* MainWindow::updateTrayIcon() is called in MainWindow::applySettingsChanges() earlier in construction. Calling this function twice in a row causes issues with startup times on Linux.
2020-06-28 16:25:00 -04:00
Sven Grewe
3596fabc78
Fix --pw-stdin by initializing text streams (#4912)
Co-authored-by: Sven qoreQyaS Grewe <sven.grewe@akquinet.de>
2020-06-28 16:24:37 -04:00
Jonathan White
fd65a47d51 Introduce Compact Mode
* Added to the new view menu, show entry/group icons at 16px and reduce toolbar icons to 22px. 
* Fix search widget being too large vertically (removed padding)
2020-06-28 16:21:50 -04:00
Jonathan White
4bf6d8d94d Introduce View Menu
* Move user interface settings from the settings widget into the view menu.
* Add auto-restart prompt to make theme changes easy
2020-06-28 16:21:50 -04:00
varjolintu
1dd758c66a
Fix send buffer size for app and proxy 2020-06-27 08:42:40 -04:00
Toni Spets
58e8d819c9 SSH Agent: Fix regression in context menu hotkeys 2020-06-26 07:15:47 -04:00
Jonathan White
736df7696f FDO Secrets: Fix double free on exit
* Prevent double free due to QObject cleanup happening before/after the ExtraPage  storing the QSharedPointer to FdoSecretsPlugin is deleted.
* Fixes #4877
2020-06-19 21:24:43 -04:00
Jonathan White
c46f3d37b1 Browser: Check for expired entry prior to custom data
* Fixes #4881
2020-06-19 21:24:22 -04:00
Jonathan White
1becb6137a On case-sensitive OS, force use of lowercase config directory
* Fixes #4835
2020-06-18 12:21:08 -04:00
Jonathan White
5f9bed6a52 Fix activating entries in database reports when sorted
* Fixes #4855
2020-06-18 12:20:31 -04:00
Jonathan White
ac3014378f Remove connection to non-existent signal
* Fixes #4858
2020-06-18 12:20:05 -04:00
Jonathan White
cbf7759e7c Improve YubiKey/OnlyKey detection with more than 2 keys
Add a small delay between key polling to let the hardware interface settle. Prevents invalid serial numbers from being pulled messing up the KeePassXC workflow.
2020-06-10 08:56:16 -04:00
Jonathan White
fbebf30b98 Fix permissions changing on database save
* Saving a database in unsafe mode retains the existing permissions on the kdbx file
* New databases (save as, save backup, new database) and new key files are saved with 0600 permissions (user read/write), fixes #2575
2020-06-07 16:00:56 -04:00
Jonathan White
1ad0184473 Fix minor UX issues with DB Open Widget
* Only clear password field when switching tabs or minimizing. This prevents the setting "Remember Key Files and Hardware Keys" from being useless with multiple databases.
* Convert key file field to Line Edit, simplifies usage. Fix clear field button as well.
* Removed need for clearForms to check if the database is being opened (was a solution to tab switching while unlocking, no longer a problem).
2020-06-06 14:40:22 -04:00
JMcKiern
6c9125402a
Cleanup welcome screen recent databases view (#4822)
* Press "Delete" to remove recent database
* Refresh recent databases on becoming visible
2020-06-06 08:26:46 -04:00
Jonathan White
712b8224c6
Decrease default database icon size to 22px
* Aligns better with entry text and condenses group list
2020-06-04 17:35:59 -04:00
Jonathan White
e039006667 Check for updates every 7 days while running
* Check every hour to see if another update check should be performed. Nothing actually happens unless 7 days has elapsed since the last update check.
* Fixes #3706
2020-06-04 10:03:40 -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
Jonathan White
b7104be689 Prevent overwriting of portable config on update
* Move portable configuration files into a config subfolder from the executable. This prevents overwriting the stored config when the application is updated in-place.
* Use .portable file to signal a portable app
* Fix #4751
2020-06-04 10:03:40 -04:00
Jonathan White
9d10792640 Update edit entry widget when backing entry changes
* Fixes #4060
* Also fix not emitting entryModified() when history is truncated. This possibly fixes other crashes with apply button when the history is truncated and then the history page is shown with a deleted entry.
2020-06-04 10:03:40 -04:00
Jonathan White
2073f2ddc3 Fix theming with Qt 5.15
* Fixes #4765
* Fixes #4766
2020-06-04 10:03:40 -04:00
Jonathan White
6f5e13815c Fix resolving resources when running from build directory
* Copy wordlists to build dir share folder
* Change resource path resolution to only test the provided directory, not finding a specific file
2020-06-04 10:03:40 -04:00
Jonathan White
c830f85c09 Various minor bug fixes / enhancements
* Fix issues when Config options were renamed
* Fix compile issues when using clang 10
* Rearrange database menu icons and import database menu icons
* Set minimum size of MainWindow to 800 to prevent search bar from hiding
* Fix not saving password generator options when closing the standalone generator
* Add headers to health check reports
* Don't show hidden content dots when notes are hidden but empty.

* Fix saving new database files in SMB shares on Windows, fixes #4809

* Gracefully handle duplicate attachments :
Instead of bailing out with an error, prepend a random string to the name of duplicate attachment records. This prevents data loss from other programs that mishandled KDBX XML writing. Fixes #2493

* Properly handle blocked import of signed KeeShare database, fixes #4413
2020-06-04 10:03:40 -04:00
Janek Bevendorff
e36cba703e Fix loading of tray icon appearance setting.
The tray icon appearance setting is null by default, since we do not
want to include OSUtils into Config. As a result, we must take special
care to preselect the correct combo box entry on the settings page.
2020-06-04 14:21:38 +02:00
Aaron D. Marasco
a91358e7bf Squash of previous remove_shadows branch 2020-06-02 15:56:16 +02:00
Janek Bevendorff
4f75432fc6 Add option for monochrome tray icon 2020-05-31 00:26:14 +02:00
Janek Bevendorff
9d2e066aca Clean up various parts of the UI and rearrange settings
- Unify widget layouts and margins
- Fix tab order on a bunch of widgets
- Fix broken entry/group edit form layout and replace with grid layout
- Rearrange some settings for better logical grouping
- Fix some settings checkboxes not being enabled/disabled on load
- Fix "General" settings tab scrolling
- Rename "Root" group to "Passwords"
- Update demo.kdbx accordingly and redownload favicons
- Change entry path display to use slash separators
- Reduce Medium and Large icon sizes slightly
2020-05-30 10:45:00 +02:00
Janek Bevendorff
4de99cfe8e
Extract highest resolution from downloaded ICO files 2020-05-29 10:00:32 -04:00
Jonathan White
b5554e05d8
Improve application icons
* Add icons for Database Import, Database Export, and Recent Databases
* Change app exit icon to be distinct from export icon
* Updated and ran makeappicons.sh
2020-05-29 10:00:32 -04:00
Jonathan White
90d5372813
Replace database icons with SVG's
Original source of icons is the icon8 library (http://icons8.com/c/flat-color-icons) and Paomedia (https://github.com/paomedia/small-n-flat). All icons used are licensed MIT or CC0; annotated in COPYING.

* Closes #4071

* Increase default size of database icons to 24px and entry preview panel to 48px
* Add shell script to assemble the database icons

* Use QIcon to seamlessly support High DPI displays and pixmap caching
* Add badge support for KeeShare groups and expired entries.
* Guard against use of QPixmap::fromImage without a GUI

* Add SVG minify and improve `make icons`

Co-authored-by: Wolfram Rösler <wolfram@roesler-ac.de>
2020-05-29 10:00:32 -04:00
Aetf
a1f599c7c4 Add an option to EntrySearcher to skip protected attributes 2020-05-27 22:07:25 -04:00
Aetf
b849fdead5 FdoSecrets: fix new db created from DBus but not saved yet is not exposed by default 2020-05-27 22:07:25 -04:00
Aetf
463bb0b03f FdoSecrets: fix prompt completed signal argument type 2020-05-27 22:07:25 -04:00
Aetf
44779bc862 FdoSecrets: add unit tests 2020-05-27 22:07:25 -04:00
Janek Bevendorff
af6493b07b Hide window and dock icon on macOS when tray enabled.
Transforms application into a UIElement agent app when
minimize to tray is enabled and the window is hidden.
This hides the dock icon and removes the application
from the Cmd+Tab listing. The changes work well together
with macOS's inbuilt hide feature.

Also fixes the buggy tray icon context menu trigger behaviour.
macOS triggers the tray context menu also on normal left
click, which causes the window to toggle at the same time
as the menu. To fix this, window toggling has been disabled
altogether on macOS and users will be shown only the context
menu from now on.

Fixes #1334
2020-05-27 10:55:11 +02:00
Foaly
b17b9683e1 Check correct CMake flag. 2020-05-26 13:34:25 -04:00
Aetf
1fbddf4149 Fix DatabaseTabWidget::lockDatabases returns false even when all tabs are locked 2020-05-24 16:56:02 -04:00
Prabesh Paudel
443614a375 Issue warning before allowing large attachments
Fixes #3782
2020-05-23 13:04:01 -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
varjolintu
43c82ccb09 Custom browser feature for Linux/macOS
* Also move "search in all databases" to the general tab
2020-05-21 14:13:45 -04:00
stingray21
d863496f62 Add DB_DIR placeholder for autoopen urls 2020-05-21 14:13:18 -04:00
Janek Bevendorff
bcb64a231f Use Segoe UI font on Windows.
Qt uses "MS Shell Dlg 2" as the default font, which resolves to
Tahoma and not Segoe UI, which is the actual Windows 10 default font.

See QTBUG-58610
2020-05-21 18:54:03 +02: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
Toni Spets
9e17d52e8e SSH Agent: Fix attachment data not updating before apply
Fixes regression since #3833 was merged
2020-05-19 09:22:15 -04:00
varjolintu
92a7fe33bd Use unlock dialog when unlocking a database from browser extension 2020-05-19 08:30:10 -04:00
Andrew Meyer
09f5a74a15 Make 'show/hide passwords' toggle temporary
Deprecates the 'hide passwords' setting in config. Passwords are always hidden on application startup.
2020-05-19 08:29:41 -04:00
Janek Bevendorff
3dc8b7a5d0 Add button to hide pre-release warning for this release. 2020-05-18 23:57:24 +02:00
varjolintu
e367c6df95 Fix merging browser keys
* Introduce protected custom data function to prevent loss during merge operations
2020-05-16 17:41:10 -04:00
varjolintu
48bf4fb85d Fix annoyances with access control dialog
* Don't send database locked/unlocked messages when "search in all databases" is enabled
* After access control dialog closes, only hide main window on macOS, and then only if previously hidden.
2020-05-16 17:40:49 -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
2237cf0188 Fix browser socket path for proxy and app
* Prefer hardcoded string, we never want this server name to change due to arbitrary reasons.
2020-05-15 20:48:51 -04:00
varjolintu
287e822e02 Allow manual editing of browser extension connection keys 2020-05-14 23:29:50 -04:00
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