Commit Graph

177 Commits

Author SHA1 Message Date
Janek Bevendorff
86278311d2
Merge branch 'master' into develop 2021-01-12 18:24:59 +01:00
Jonathan White
a74e2391e8 Copy history when drag/drop entries and groups
* Fix #5809
2020-12-20 22:57:42 -05:00
krsnik93
2ee4168956 Display default autotype sequence on entry preview pane
* Fix #5450
2020-12-13 11:33:03 -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
3f7e79cdf3 Add Argon2id KDF (backport of #5726) 2020-12-04 15:11:28 +01:00
Janek Bevendorff
9a96124040 Add Argon2id KDF 2020-12-03 20:06:58 +01:00
Aetf
9f4118974d FdoSecrets: fix signal connections 2020-11-13 17:20:45 -05:00
Aetf
a651d7049d FdoSecrets: handle corner cases in collection dbus names, fix #5279
- Use completeBaseName rather than baseName to ensure nonempty name
- Handle two databases have the same name
- Cleanup Service::onDatabaseTabOpened logic
2020-11-13 17:16:22 -05:00
Aetf
f5caf3968f FdoSecrets: fix typos 2020-11-13 17:16:22 -05:00
Jonathan White
0c5dd1556a
Merge branch 'release/2.6.2' into develop 2020-10-15 00:13:14 -04:00
Janek Bevendorff
389899e0c6 Fix theme issues on macOS
* Fix #5025 - Change edit entry widget title separator to the common bullet character • (U+2022)
* Fix #5307 and Fix #5347 - Remove transparent toolbar/window on macOS and properly color text in toolbar.
2020-10-14 23:55:01 -04:00
Jonathan White
b0e038e789 Improve default Qt widget icons
* Include new icons for toolbar overflow to ensure they are tinted correctly and fit in with the rest of the UI.
* Replace custom code for clearing line edits by including a proper icon for the default action.
2020-10-14 23:55:01 -04:00
louib
48d9fb3e79
Remove GUI bootstraping from core/ (#5513) 2020-10-08 22:48:45 -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
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
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
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
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
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
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
44779bc862 FdoSecrets: add unit tests 2020-05-27 22:07:25 -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
689a85a071 Make GUI tests more robust for CI 2020-05-16 00:47:01 +02: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
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
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
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
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
b0ad4a50d9
Fix GUI test failures 2020-01-27 21:02:50 -05:00
louib
c8ab3b5f4f Removing QColor (from Qt::Widgets) from core modules. (#4247) 2020-01-26 21:38:43 -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
Jonathan White
7ad330eccb Improve GUI test reliability
* Explicitly resize the window to improve testing on High DPI displays
* Add additional bootstrap calls to mimic the actual application
2020-01-03 18:08:24 -05:00
Jonathan White
f9d2696046 Relax strictness of TOTP Base32 validation
* Fix #3754 - Accept valid TOTP keys that require padding when converted to Base32.
* Allow use of spaces and lower case letters in the TOTP secret key.
2019-11-09 00:53:40 +01:00
Jonathan White
178bea6bbc Fix building without features
* Fix #3684 - Include YubiKey headers in CLI tests 

* Skip building testguibrowser if browser integration is disabled

* Cleanup test CMakeLists
2019-10-29 23:03:39 -04:00
Jonathan White
1e694271a3 Improve Database and CLI tests 2019-10-20 18:56:41 -04:00
varjolintu
f726d7501f Add support for multiple URLs in an entry
* Fixes #398

The new Browser Integration entry settings page has a list view with any additional URL's. These URL's are added to the entry attributes with KP2A_URL_<counter>, which means those are directly compatible with Keepass2Android.
2019-10-16 22:20:57 -04:00
James Ring
b1eda37cca CLI: Add interactive session mode command open
This change adds a GNU Readline-based interactive mode to keepassxc-cli. If GNU Readline is not available, commands are just read from stdin with no editing or auto-complete support.

DatabaseCommand is modified to add the path to the current database to the arguments passed to executeWithDatabase. In this way, instances of DatabaseCommand do not have to prompt to re-open the database after each invocation, and existing command implementations do not have to be changed to support interactive mode.

This change also introduces a new way of handling commands between interactive and batch modes.

* Fixes #3224.
* Ran make format
2019-09-28 11:24:42 -04:00
varjolintu
77be468670 Fix crash when removing custom data 2019-09-07 07:50:08 -04:00
Matthias Drexler
f85642741d Autocomplete usernames based on most frequent in database
* Fixes #3126
* Limit autocompletion to the top ten used usernames
- Load common usernames when database is opened
- Transition from QLineEdit to QComboBox for usernames
- Dropdown menu of the combobox lets user choose a common username
- Common usernames are autocompleted via inline completion
- Common usernames are sorted by frequency (first) and name (second)
2019-06-23 22:22:57 -04:00
Balazs Gyurak
09181fab13 Add group sorting feature
* Enabling sorting of groups and their children in ascending and descending direction
2019-06-18 18:51:38 -04:00
Jonathan White
faf7a2bbb3 Robust processing of tray icon triggers
* Support double click on tray icon to always toggle window to/from tray
* Single click on tray icon will bring window to front if in background, otherwise window is toggled
* Fixes #2956
2019-05-04 16:45:03 -04:00
Jonathan White
4b1258f585 Correct issues with apply button
* Don't show apply button when creating new entries or groups (Fix #2191)
* Don't mark entry/group as dirty when first creating a new one (prevents unnecessary discard dialog on cancel)
* Properly enable/disable apply button when changes are made to entries and groups
* Don't show discard change warning when locking database unless their are actual changes made

NOTE: Extra pages in the group edit widget are not watched for changes yet. Requires a major refactor.
2019-04-07 19:12:45 -04:00
Jonathan White
71e375aff0 Allow copying passwords directly from searching
* Reverts removal of previously implemented feature
* Fix #2630
* Make gui search tests more robust
2019-04-07 19:12:45 -04:00
Weslly
779b529da2 Update checking feature (#2648)
* Check on startup (toggleable setting) and manually
* Option to check for pre-releases (eg, 2.4.0-beta1)
* Only included if WITH_XC_NETWORKING is enabled
2019-01-30 09:11:50 -05:00
Jonathan White
c74664097b
Fix crash when canceling save of new database (#2601)
* Fix crash when canceling save of new database
* Standardize use of DatabaseWidget::save() function
* Close new database tabs that are "discarded"
* Fixes #2604. autoSaveOnExit setting
* Re-implement autosave functionality
2019-01-25 07:20:39 -05:00