Commit Graph

411 Commits

Author SHA1 Message Date
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
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
9ab531473a Fix AutoOpen with key file only databases
* Fixes #3931
2020-01-03 18:08:24 -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
Janek Bevendorff
22af66e3b5 Ensure database contents are released right away.
When we lock a database, we reset the database pointer to
free its resources. Since various other widgets besides the
DatabaseWidget hold references to the shared pointer object,
however, it cannot be guaranteed that the actual database
object will be freed right away. This patch adds a releaseData()
method which is called upon database lock to ensure all
residual data is cleared without having to rely on the actual
database object being cleaned up.
2019-11-09 11:33:32 +01:00
Jonathan White
4edb623745 Prevent recursive loads using AutoOpen
* Fix #3334 - AutoOpen is now processed after the database widget is put into view mode to prevent infinite recursion of unlock attempts if two databases  auto open each other.
2019-11-09 00:53:40 +01:00
Jonathan White
cb9929712c Start Database Widget in view mode
* Fix #3713 - DatabaseWidget starts in locked mode instead of view mode fixing tab names on launch.
2019-11-09 00:53:40 +01:00
Jonathan White
af263fd80d Prevent new entry loss on database file reload
* Fix #3651

* Correct data loss when the database reloads due to a file change while creating a new entry. The issue occurred due to the "new parent group" pointer being invalid after the database is reloaded following merge.

* Also fix re-selecting entries following database file reload. If the entry was moved out of the current group it would result in an assert hit. This fix prevents recursively looking for the entry.
2019-10-23 22:47:59 -04:00
Jonathan White
56a3e4d680 Enable entry actions when editing an entry
* Fixes #2118

Enables select entry actions when editing an entry. This allows users to copy the password of the entry, for example.

Note: unsaved changes to the entry will not be copied to the clipboard.
2019-10-20 20:34:48 -04:00
Jonathan White
744b4abce8 Move FileWatcher into Database class
* Fix #3506
* Fix #2389
* Fix #2536
* Fix #2230

Every database that has been opened now watch's it's own file. This allows the database class to manage file changes and detect fail conditions during saving. Additionally, all stakeholders of the database can listen for the database file changed notification and respond accordingly.

Performed significant cleanup of the autoreload code within DatabaseWidget. Fixed several issues with handling changes due to merging, not merging, and other scenarios while reloading.

Prevent database saves to the same file if there are changes on disk that have not been merged with the open database.
2019-10-20 18:56:41 -04:00
Jonathan White
6b746913e4 Cleanup database save functions
* Make a clear distinction between saving to the existing file path and saving to a new file path
* Use proper save function calls in CLI
2019-10-20 18:56:41 -04:00
metaphys
72c1783b5b Support key files with Auto Open feature
Fixes #3495

* Look for keyfile in username parameter of the Auto Open entries. If present, pass on to unlock call to the database.
2019-09-07 07:46:01 -04:00
Frederic Linus Schulz
0a3b19edf2 Add checkbox to allow minimize after database unlock.
Default option is set to off
2019-09-02 21:53:16 -04:00
Gianluca Recchia
fccbb98b8e Improve File Dialog
* QFileDialog returns UNIX paths, even on Windows. This patch converts what QFileDialog returns to the native path format.

* Improve const correctness

* Avoid imposing file extension on Linux

* This patch improves things like unneeded passes by values, missing const qualifiers, ugly copies because of variable reuse and consistency in variable names.
2019-08-30 22:30:30 -04:00
Jonathan White
2aac83d03b
Improve handling of read-only files (#3408)
* Fix #3407
* Read-only files now disable auto-save and show as modified correctly. This allows the GUI to prompt to "save-as" instead of silently discarding changes when the read-only database is locked or closed.
2019-08-30 21:39:37 -04:00
Sami Vänttinen
6ae27fa47b Download all favicons (#3169)
* Selecting one or more entries to download icons always forces the download (ie, if a new URL exists the new icon will be downloaded and set)
* Instead of downloading for each entry, the web url's are scraped from the provided entries and only those urls are downloaded. The icon is set for all entries that share a URL. This is useful if a group contains many entries that point to the same url, only 1 download call will occur.
* The icon download dialog displays whether you are doing one entry, many entries, or an entire group. It is also modal so you have to dismiss it to use KeePassXC again.
* Moved DuckDuckGo fallback notice into the download dialog.
2019-07-07 15:29:11 -04:00
Balazs Gyurak
8e248bbde6 Drop to background on copy feature 2019-06-29 07:34:41 -04:00
Jeff
a22e8a1f40 Add MinimizeOnUrlOpen feature 2019-06-23 12:04:24 -04:00
Aigale
c5a93ca215 Fix resolving placeholders in urls (#3281)
* Replace placeholders in URLs copied from popup menu on the entry preview widget.
* Replace placeholders in URLs opened by double-clicking URL field in the entry table.
2019-06-19 20:48:35 -04:00
Matthias Drexler
bb8377ae6a Allow setting group icons to children groups/entries (#3273)
* Add combo menu button to apply an icon to children

- allow more options to apply icons (child groups, child entries)
- extend tests in TestGroup (applying icons for groups/entries only)
- prevent blue folder icon being set for entries (on entry creation only)

* Do not show the combo menu button for entries
2019-06-19 10:02:07 -04:00
louib
84eec03cb7 Add CLI --dry-run option for merge (#3254) 2019-06-18 21:45:24 -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
sohamg
7c45d4f328 Fix #3259 Use QUrl::fromUserInput to parse a url with correct scheme
Signed-off-by: sohamg <sohamg2@gmail.com>
2019-06-13 18:37:19 -04:00
Jonathan White
16a11c3a7f
Merge branch 'master' into develop 2019-05-31 16:17:47 -04:00
Jonathan White
96b0ea45dd Update Group in Preview Widget when focused
* Fixes #3129
* Also fix out of bounds access when no entries are present in EntryView and up/down arrow pressed
2019-05-31 08:22:38 -04:00
Jonathan White
63aab99b9c
Merge branch 'release/2.4.2' into develop 2019-05-30 17:22:09 -04:00
Jonathan White
125a81f2ed Implement 1Password Vault Import
* Support importing 1Password vaults (.opvault folders) into KDBX database
* Entry attributes are filled based on section and field name
* Expiration dates are set for entries
* Entry URL's are set from a wider array of fields
2019-05-19 18:21:34 -04:00
Jonathan White
ecaa4fd6ce Fix opening url's with non-http schema
* Fix #2427
* Changed the openUrl() function to use a QUrl object, which has the appropriate scheme set.
* Preview widget now passes url handling back to DatabaseWidget
2019-05-19 00:20:43 -04:00
Aetf
d93f33f514 Improve existing code prior to implementing FDO Secrets
* DatabaseTabWidget::newDatabase returns the created DatabaseWidget
* Emit DatabaseTabWidget::databaseOpened signal before a new tab is added
* EntrySearcher can now search attribute values including custom ones
* Add Group::applyGroupIconTo to set the group icon on the supplied entry
* Implement desktop notifications through the system tray icon
* Add DatabaseWidget::deleteEntries to delete a list of entries
* Add Aes128 in SymmetricCipher::algorithmIvSize
* Add DatabaseWidget::databaseReplaced signal
* Add a helper class to override the message box's parent (prevent bugs)
2019-05-12 12:35:42 -04:00
Jonathan White
219a0f40ff Prevent infinite save loop when location is unavailable (#3026)
This bug impacted unsafe saves. When auto save after every change was enabled, an
unsafe save to a location that has become unavailable (eg, dismounted veracrypt drive),
the database modified signal would continually activate a save action that failed.
This caused an infinite loop.

When auto-save on exit was enabled, the database tab and the application itself refused to
close if saving failed for whatever reason.

The fixes in this commit prevent both of these scenarios from occurring.
2019-04-20 18:10:07 +02:00
Weslly
fbba5b1420 Fix conditional build flags for yubikey and keeshare 2019-04-12 16:29:13 -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
3b0b5d85e9 Correct behaviors when saving database fails
* Mark database dirty if saving fails
* Restore database file from backup if unsafe save fails between deleting database file and copying temporary file into place
* Improve error message display for opening and saving database files
* Do not automatically retry saving after failure. This prevents deletion of the backup database file and improves user awareness of issues.
2019-04-07 12:12:43 -04:00
Lars Wendler
eb9ff677d0 src/gui/DatabaseWidget.cpp: Build fails without WITH_XC_KEESHARE
/var/tmp/portage/app-admin/keepassxc-2.4.0/work/keepassxc-2.4.0/src/gui/DatabaseWidget.cpp: In member function ‘void DatabaseWidget::search(const QString&)’:
/var/tmp/portage/app-admin/keepassxc-2.4.0/work/keepassxc-2.4.0/src/gui/DatabaseWidget.cpp:1115:5: error: ‘m_shareLabel’ was not declared in this scope
     m_shareLabel->setVisible(false);
     ^~~~~~~~~~~~
/var/tmp/portage/app-admin/keepassxc-2.4.0/work/keepassxc-2.4.0/src/gui/DatabaseWidget.cpp:1115:5: note: suggested alternative: ‘m_searchingLabel’
     m_shareLabel->setVisible(false);
     ^~~~~~~~~~~~
     m_searchingLabel
2019-03-20 17:22:41 -04:00
ckieschnick
11ecaf4fa4 Hotfix/2657 prevent share overwrite (#2746)
* Fix problem with export from newly saved database

Newly created/saved databases (or used with DatabaseWidget::saveAs)
were not exported/imported correctly.
Fixed the problem by reinitializing the ShareObserver on
DatabaseWidget::saveAs.

* Introduce warnings and prevent conflicting shares

Introduced several warnings and errors to indicate improper settings.
Prevent export when a path is used multiple times (only the file path is
checked - may ignore multiple similar ways to reference a share).

* Improve KeeShare integration in DatabaseWidget

Moved initial KeeShare association to constructor.
Introduced Q_UNUSED to indicate need for assignment statement.
2019-03-15 22:39:46 -04:00
ckieschnick
ebb87e6379 Add share indication label in group view (#2742)
* When viewing a shared group, the sharing state is indicated by a label
similar to the search label.
* Banner shows on children of shared groups
* When searching, share banner is hidden
* Fixed issue where group/entry information was not updated after change
2019-03-07 10:57:13 -05:00
Gianluca Recchia
9a5bbea2e4
Use QFileInfo's exists() static method
The exists() static method is documented to be faster than its
equivalent member method.

See https://doc.qt.io/qt-5/qfileinfo.html#exists-1
2019-01-30 09:50:06 -05:00
Jonathan White
7e1b16250c Performed project-wide code formatting
* Updated format CMake command to properly
ignore new directories and files
* Added output when command is run
* Resolves #2623
2019-01-28 22:38:59 -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
AlexJoss
cbf92598e2 Add gui dialog when merge makes no changes (#2551)
* Add gui dialog when merge makes no changes
* Add gui dialog when merge makes changes
2019-01-21 14:28:37 -05:00
Christian Kieschnick
d4c391deb2 Splitted KeeShare into secure and insecure parts
KeeShare is now supported in a secure and insecure flavor (set
CMake-Flags accordingly to allow or disallow the corresponding import
and exports)
2019-01-03 10:05:08 +01:00
Jonathan White
21de6f6163
Merge branch 'develop'
Conflicts:
	src/core/Tools.cpp
	src/sshagent/SSHAgent.cpp
2018-12-30 16:32:57 -05:00
Jonathan White
b96b86bfa7 Cleanup and replumb back to functional state 2018-12-28 17:54:52 -05:00
Wojtek Gumuła
c630214915 Warn user if deleting entries that are referenced. (#1744)
On warning, references can be replaced with original values or ignored.
Removal process can be also skipped for each conflicting entry. Resolves #852.
2018-12-24 18:15:46 -05:00
Kyle Kneitinger
4d4c839afa Customize buttons on MessageBox and confirm before recycling (#2376)
* Add confirmation prompt before moving groups to the recycling bin

Spawn a yes/no QMessage box when "Delete Group" is selected on a group
that is not already in the recycle bin (note: the prompt for deletion
from the recycle bin was already implemented).  This follows the same
pattern and language as entry deletion.

Fixes #2125

* Make prompts for destructive operations use action words on buttons

Replace yes/no, yes/cancel (and other such buttons on prompts that cause
data to be destroyed) use language that indicates the action that it is
going to take. This makes destructive/unsafe and/or irreversible operations
more clear to the user.

Address feedback on PR #2376

* Refactor MessageBox class to allow for custom buttons

Replaces arguments and return values of type QMessageBox::StandardButton(s)
with MessageBox::Button(s), which reimplements the entire set of
QMessageBox::StandardButton and allows for custom KeePassXC buttons,
such as "Skip". Modifies all calls to MessageBox functions to use
MessageBox::Button(s).

Addresses feedback on #2376

* Remove MessageBox::addButton in favor of map lookup

Replaced the switch statement mechanism in MessageBox::addButton with
a map lookup to address CodeFactor Complex Method issue. This has a
side-effect of a small performance/cleanliness increase, as an
extra QPushButton is no longer created/destroyed (to obtain it's label
text) everytime a MessageBox button based on QMessageBox::StandardButton
is created; now the text is obtained once, at application start up.
2018-12-19 23:14:11 -05:00
Jonathan White
9e2be34897
Merge branch 'develop'
Conflicts:
	CMakeLists.txt
	cmake/CLangFormat.cmake
	snapcraft.yaml
	src/CMakeLists.txt
	src/core/Database.cpp
	src/core/Database.h
	src/core/Tools.cpp
	src/crypto/CryptoHash.h
	src/crypto/ssh/ASN1Key.h
	src/crypto/ssh/OpenSSHKey.cpp
	src/format/Kdbx4Reader.cpp
	src/gui/DatabaseTabWidget.cpp
	src/gui/DatabaseTabWidget.h
	src/gui/DatabaseWidget.cpp
	src/gui/DatabaseWidget.h
	src/gui/DetailsWidget.cpp
	src/gui/DetailsWidget.ui
	src/gui/EditWidgetProperties.cpp
	src/gui/EntryPreviewWidget.cpp
	src/gui/EntryPreviewWidget.ui
	src/gui/FileDialog.cpp
	src/gui/dbsettings/DatabaseSettingsDialog.cpp
	src/gui/dbsettings/DatabaseSettingsDialog.h
	src/gui/group/EditGroupWidget.cpp
	src/gui/group/EditGroupWidget.h
	src/sshagent/ASN1Key.h
	src/sshagent/OpenSSHKey.cpp
	src/sshagent/SSHAgent.cpp
	tests/CMakeLists.txt
2018-12-18 22:28:56 -05:00
Gianluca Recchia
fc930bae69
Restore correct formatting
Many lines were not conformant with the project's formatting rules.
This patch should fix all formatting and whitespace issues in the code
base.
A clang-format directive was put around the connect() calls containing
SIGNALs and SLOTs whose signatures would be denormalized because of the
formatting rules.
2018-11-28 18:29:15 -05:00
Jonathan White
d84ba23c81
Correct refactor issues with entry selection and search (#2518)
* Align entryview selection change signals with groupview
* Eliminate redundent and confusing signals/slots
* Correct group selection canceling search
2018-11-28 16:13:56 -05:00
Janek Bevendorff
3c362ac822 Refactor DatabaseOpenWidget/Dialog and Auto-Type Database unlocking.
This patch removes redundant lock widget members of the DatabaseWidget
and consolidates all unlocking functionality into a single
DatabaseOpenWidget (with the exception of KeePass1OpenWidget).
Distinction between different unlock actions is now done via a dedicated
Intent enum class instead of using individual widgets.

Further, the DatabaseUnlockDialog has been generalized so that it is
usable for unlock intents other than just Auto-Type and is now also
used for merging databases which is less confusing to the user.

The KeePassXC main window is no longer a parent of the
DatabaseUnlockDialog and has the Qt::ForeignWindow flag set, which
should cause fewer issues with Auto-Type trying to type into KeePassXC
after unlock instead of the intended target window.

In addition, its instance has been moved into the DatabaseTabWidget
class so that it is no longer bound to individual DatabaseWidgets,
potentially allowing for database selection during Auto-Type. The actual
selection has not yet been implemented, but Auto-Type has been adjusted
to use the currently selected tab instead of the first one as an
intermediary improvement.
2018-11-24 15:51:05 +01:00
Jonathan White
ff7191eef3 Re-implement AutoOpen functionality after refactor (#2504)
The database refactor in #2491 removed auto-open functionality.
2018-11-23 19:24:59 +01:00
Janek Bevendorff
785a64cc3b Fix bugs introduced by database refactor #2491 (#2503)
* Fix SSHAgent identity removal on database lock
* Refactor storage and manipulation of SSHAgent keys to streamline process with multiple db's
* Clear password field when widget is hidden, resolves #2502
2018-11-23 07:49:55 -05:00
Janek Bevendorff
d612cad09a
Refactor Database and Database widgets (#2491)
The Database, DatabaseWidget, and DatabaseTabWidget classes share many responsibilities in inconsistent ways resulting in impenetrable and unmaintainable code and a diverse set of bugs and architecture restrictions. This patch reworks the architecture, responsibilities of, and dependencies between these classes.

The core changes are:

* Move loading and saving logic from widgets into the Database class
* Get rid of the DatabaseManagerStruct and move all the information contained in it into the Database
* Let database objects keep track of modifications and dirty/clean state instead of handing this to external widgets
* Move GUI interactions for loading and saving from the DatabaseTabWidget into the DatabaseWidget (resolves #2494 as a side-effect)
* Heavily clean up DatabaseTabWidget and degrade it to a slightly glorified QTabWidget
* Use QSharedPointers for all Database objects
* Remove the modifiedImmediate signal and replace it with a markAsModified() method
* Implement proper tabName() method instead of reading back titles from GUI widgets (resolves #1389 and its duplicates #2146 #855)
* Fix unwanted AES-KDF downgrade if database uses Argon2 and has CustomData
* Improve code

This patch is also the first major step towards solving issues #476 and #2322.
2018-11-22 11:47:31 +01:00
Jonathan White
d6ffee5e99
Implement search auto-clear and goto group
* Search clears if the search box does not have focus for 5 minutes (fixes #2178)
* Goto group from search results after double clicking the group name (fixes #2043)
2018-11-17 09:02:36 -05:00
Jonathan White
4b983251cb
Add advanced search term parser
* Support quoted strings & per-field searching
* Support regex and exact matching
* Simplify search sequence
* Make search widget larger
* Add regex converter to Tools namespace
2018-11-17 08:49:50 -05:00
Jonathan White
4b57fcb563
Clean up Entry Model/View code 2018-11-17 08:49:47 -05:00
Jonathan White
d8d758f0e1
Streamlined searcher code
* Remove searching of group title and notes
* End search when selecting a new group
* Correct entry searcher tests to align with new code
2018-11-17 08:49:02 -05:00
Jonathan White
ee9c71e11e
Fix multiple issues with entries and keyboard shortcuts (#2431)
* Cleanup entry change notification with entryview focus in/out
* Change Open URL shortcut to CTRL+SHIFT+U to conform with an "action" 
including SHIFT
* Change Copy URL shortcut to CTRL+U to conform with "copy" without SHIFT
* Entry specific toolbar and menu items are disabled unless the entry
row has focus (prevents unintended actions)
* Reword security setting for password visibility in entry edit view
* Add shortcut to hide/unhide usernames (CTRL+SHIFT+B)
* Organize entry menu

* Fix #1588 - show keyboard shortcuts in context menu
* Fix #2403 - Change auto-type shortcut to CTRL + SHIFT + V
* Fix #2096 - Add (CTRL+F) to search bar background
* Fix #2031 & Fix #2266 - add shortcut to hide/unhide passwords (CTRL+SHIFT+C)
* Fix #2166 - Add reveal password button to entry preview
2018-11-16 10:00:59 -05:00
Gianluca Recchia
0f604aa8c7
Normalize signature of SIGNAL() and SLOT()
See https://stackoverflow.com/q/18091058/6335279
2018-10-31 15:16:04 +01:00
Gianluca Recchia
f31d65bdaf Replace deprecated parts of the code (#2419)
Performing a dev build against the latest version of Qt failed
because of some deprecated members. They have been replaced
according to the Qt documentation.

Further, Q_OS_MACOS is now the only macro available to identify a
machine running macOS, the others are now deprecated.
See https://doc.qt.io/qt-5/qtglobal.html#Q_OS_OSX and
https://doc.qt.io/qt-5/qtglobal.html#Q_OS_MAC.
2018-10-26 15:19:04 +02:00
Jonathan White
a44138dd5c Multiple fixes to MainWindow and some cleanup
* Fix MainWindow startup when minimize to tray was enabled
* Reduce duplicate code in DatabaseWidget.cpp
* Fix snapcraft build dependencies
* Add support for CTRL+TAB, CTRL+PGUP, CTRL+SHIFT+TAB, CTRL+PGDN to control database tabs from any focus location
* Add CTRL+SHIFT+M shortcut to minimize to tray
* Allow minimize instead of app exit without tray icon
2018-10-20 15:30:48 +02:00
Janek Bevendorff
0ca7fd369a Implement review feedback 2018-10-19 22:16:44 +02:00
Sami Vänttinen
b8d2d5d877 Choose database for saving or updating entries from KeePassXC-Browser (#2391) 2018-10-19 14:44:08 -04:00
Adolfo E. García
bb16dc6d01 Add QR code generator for TOTP export (#1167)
* Resolves #764
* Add libqrencode and qtsvg dependencies 
* Ensure QR code remains square
* Auto-close QR code dialog when database is locked
* Add databaseLocked() Signal to databaseWidget
* Correct otpauth URI output in Totp::writeSettings(...)
2018-10-19 14:42:49 -04:00
Kyle Kneitinger
265325057a Create config file deprecation mechanism & rename Details->Preview (#2371)
Rename UI elements involved with the bottom preview panel to use the
terminology "entry preview panel" instead of "details view" or "preview
panel". Change all associated variables, widgets, and classes to
reference EntryPreviewPanel. Create Config::upgrade() function and
deprecation mapping to help rename/remove previous config settings in a
clean manner.

Fixes #2327
2018-10-08 21:11:44 -04:00
Christian Kieschnick
eca9c658f4
Add sharing of groups between databases
* Add source folder keeshare for sharing with corresponding define WITH_XC_KEESHARE
* Move common crypto parts to src/crypto/ssh
* Extended OpenSSHKey
* Move filewatching to own file (currently in two related classes DelayedFileWatcher and BulkFileWatcher)
* Small improvements for style and code in several classes
* Sharing is secured using RSA-Keys which are generated on demand
* Publisher signs the container using their private key
* Client can verify the signed container and choose to decline an import,
import only once or trust the publisher and automatically import all
data of this source henceforth
* Integration of settings into Group-Settings, Database-Settings and Application-Settings
* Introduced dependency QuaZip as dependency to allow combined export of
key container and the (custom format) certificate
2018-10-01 10:39:37 -04:00
Jonathan White
c1e9f45df9 Introduce synchronize merge method
* Create history-based merging that keeps older data in history instead of discarding or deleting it
* Extract merge logic into the Merger class
* Allows special merge behavior
* Improve handling of deletion and changes on groups
* Enable basic change tracking while merging
* Prevent unintended timestamp changes while merging
* Handle differences in timestamp precision
* Introduce comparison operators to allow for more sophisticated comparisons (ignore special properties, ...)
* Introduce Clock class to handle datetime across the app

Merge Strategies:
* Default (use inherited/fallback method)
* Duplicate (duplicate conflicting nodes, apply all deletions)
* KeepLocal (use local values, but apply all deletions)
* KeepRemote (use remote values, but apply all deletions)
* KeepNewer (merge history only)
* Synchronize (merge history, newest value stays on top, apply all deletions)
2018-09-30 09:36:39 -04:00
vasporig
61d7e6bc6c Do polling based file watching for NFS on linux, resolves #1799 2018-09-25 21:25:52 -04:00
Janek Bevendorff
e443cde452 Add a new database settings wizard
This patch implements a new database wizard to guide users through the process
of setting up a new database and choosing sane encryption settings.

It also reimplements the master key settings to be more
user-friendly. Users can now add, change, or remove individual composite
key components instead of having to set all components at once. This
avoids confusion about a password being reset if the user only wants to
add a key file.

With these changes comes a major refactor of how database composite keys and key
components are handled. Copying of keys is prohibited and each key
exists only once in memory and is referenced via shared pointers. GUI
components for changing individual keys are encapsulated into separate
classes to be more reusable. The password edit and generator widgets
have also been refactored to be more reusable.
2018-09-25 21:12:47 +02:00
Max Kolhagen
d9fcdd2920 Add TouchID support on macOS 2018-09-18 22:42:05 -04:00
Jonathan White
1dc9f10c7f
Complete refactor of TOTP integration
* Eliminate TOTP logic from GUI elements
* Consolidate TOTP functionality under the Totp namespace
* Eliminate guessing about state and encoders
* Increased test cases
* Add entry view column for TOTP [#2132]
* General code cleanup, reduction of unnecessary steps, separation of concerns
* Rename SetupTotpDialog to TotpSetupDialog for consistency
2018-09-15 12:10:26 -04:00
Jonathan White
ca27fb06d5
Merge branch 'master'
Conflicts:
	INSTALL.md
	release-tool
	src/browser/BrowserOptionDialog.cpp
	src/browser/BrowserService.cpp
	src/browser/BrowserService.h
	src/browser/NativeMessagingBase.h
	src/browser/NativeMessagingHost.h
	src/core/Uuid.cpp
	src/gui/DatabaseTabWidget.cpp
	src/gui/DatabaseWidget.cpp
	src/gui/EditWidget.cpp
	src/gui/MainWindow.cpp
	src/gui/MainWindow.ui
	src/proxy/NativeMessagingHost.h
	src/sshagent/ASN1Key.cpp
2018-08-24 09:42:38 -04:00
Jonathan White
add4ba21fa
Show all url schemas in entry view (#1768)
* Show all url schemas in entry view
* Fix UUID being built improperly with invalid user input
2018-07-14 17:08:04 -04:00
pasdam
ad4423d226
Replaced Uuid with QUuid 2018-07-06 22:23:49 -04:00
seregaxvm
e124f17c64 Add advanced password generator features (#1841)
* Split between simple and advanced features
* Finetune password character groups
* Support for hex passwords
2018-06-10 22:37:09 -04:00
Louis-Bertrand Varin
8324d03f0a Formatting the code. 2018-03-31 16:01:30 -04:00
Edward Jones
963a7802d1 Fix pluralization of confirmation prompts 2018-03-13 20:41:16 +00:00
Steven Noonan
386b78b896 attributes: unbreak copy-to-clipboard on KDE
The 'text' property of the QAction gets mangled by KDE when it adds its
own accelerator shortcuts. But the data property is ours. Use that for
keying instead.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2018-03-06 19:22:38 +01:00
Janek Bevendorff
a5dc1964a9 Resize details widget to minimum by default 2018-03-03 12:59:06 +01:00
Janek Bevendorff
ad92b11f12 Use edlided label for details widget title and adjust layout spacing 2018-02-26 01:11:57 +01:00
Jonathan White
8c4df37062 Only show entry update message when hitting apply 2018-02-25 19:27:06 +01:00
Jonathan White
cd3e1fc27e Ask to apply generated password when commiting an entry edit
* Rename saveEntry to commitEntry to accurately capture its purpose
* Add message to user when commit is successful
* Made all inline messages in edit entry view 2 sec visibility
2018-02-21 09:38:27 +01:00
Nick Spain
5c51d11651 Fix Issue #1447 by using entry's group when not creating entry 2018-02-18 16:17:12 +01:00
frostasm
6007e0de71 Refactor DetailsWidget 2018-02-04 15:51:30 +02:00
Janek Bevendorff
527868a6b3
Guarantee that configuration values are committed to disk on exit 2018-02-04 13:56:46 +01:00
Janek Bevendorff
8da3efa2c2 Add disambiguation info to source strings 2018-01-21 15:54:46 +01:00
Fonic
8c78aca69e Code cleanup
Comprehensive code cleanup:
- formatting
- comments
- obsolete code
2018-01-21 15:17:05 +01:00
Fonic
e3a5a22b84 Update state syncer to account for new features
Update state syncer (class DatabaseWidgetStateSync) to account for new
features:
- properly sync view state when switching tabs
- properly read/write view state from/to config

Update classes EntryModel and EntryView to consistenly name list/search
modes. Before, both classes defined list mode as 'group mode' and search
mode as 'entry list mode', which differed from naming in other classes
such as DatabaseWidget.
2018-01-21 15:17:05 +01:00
Fonic
18be1a0254 Add 'copy-on-doubleclick' feature to entry view table
Add 'copy-on-doubleclick' feature to entry view table by extending
already existing DatabaseWidget::entryActivationSignalReceived().

Currently, username, password and notes are copyied on doubleclick,
while doubleclicking URL still opens browser as before.

Can easily be extended to account for other/additional columns
(switch-case).
2018-01-21 15:17:05 +01:00
thez3ro
00ce60ef20
create new entry while searching 2018-01-18 01:16:46 +01:00
Jonathan White
bef7ba2cfe
Implements KDBX4 format with Argon2 KDF
* Adds KDBX4 reader/writer interfaces
* Adds KDBX4 XML reader/write interfaces
* Implements test cases for KDBX4
* Fully compatible with KeePass2
* Corrects minor issues with Argon2 KDF
2018-01-13 14:24:55 -05:00
Adolfo E. García
540bcd8d70 Refactor src/DatabaseWidget.cpp
Based on input from PR #1167's code review.
2018-01-09 12:47:12 +01:00
Jonathan White
1a7b874c60 Consistency using filepath and minor code fixes 2018-01-04 19:09:36 -05:00
Jonathan White
a80d1bbd2b Addressed comments; further streamlined code 2018-01-04 19:09:36 -05:00
Jonathan White
c2d04499ab Remove lock file and cleanup file handling [#1002] 2018-01-04 19:09:36 -05:00
thez3ro
a02a49a184
add test for syntax checking 2018-01-03 12:56:18 +01:00
Marco
8ca444aee0
add a method to perform the autotype sequence showing graphical dialogs
Dialogs are show when the syntax of the autotype statement is wrong or contains long delays or statements which are repeated very often
2018-01-03 12:56:18 +01:00
Marco
4893d99774
move autotype syntax warning and error dialogs from AutoType to DatabaseWidget in the gui folder and replaced it with a checkSyntax call.
this fixes part of why autotype test fails
2018-01-03 12:56:18 +01:00
frostasm
c490c21cd5 Move attachments view to the separate widget EntryAttachmentsWidget 2017-12-25 14:36:43 +02:00
frostasm
0c200d360b Add attachments tab to details view 2017-12-24 20:10:12 +02:00
louib
8037a79673
Add \n in merge request message. (#1310) 2017-12-20 18:08:18 -05:00
alterratz
468519cd46
Merge branch 'develop' into feature/autoopen 2017-11-28 17:29:05 +01:00
Janek Bevendorff
8651736e61
Merge branch 'release/2.2.3' into develop 2017-11-26 18:23:48 +01:00
Jonathan White
e17b3d24bf Corrected database corruption when locked [#1113] 2017-11-23 21:32:56 +01:00
Joel Smith
8ca52ba8f9 Add initial Steam TOTP support
* Add the concept of custom TOTP encoders, each with potential for custom
  code alphabet, length, step interval and code direction (i.e. reversed)
* Select custom encoder via overload of the digits field of a loaded entry
* Allow selection of custom encoders via the "TOTP Settings" field's
  size, as currently done by KeeTrayTOTP for Steam. Use "S" for the
  short name of the Steam custom encoder
* Allow selection of custom encoders via the "otp" field by appending
  a "&encoder=<name>" field to the URL query. For example,
  "&encoder=steam"
* Update TOTP set-up dialog to permit selection between (default,
  steam, custom) settings.
2017-11-20 17:08:01 -07:00
Weslly
3b8d49104c
Focus database unlock dialog on macOS, fix #1023 2017-11-20 04:26:53 -02:00
Toni Spets
4840c2c64f SSH agent support 2017-11-19 14:38:59 +02:00
thez3ro
c3c67f18b8
add test for DB creation 2017-11-02 20:07:41 +01:00
frostasm
8b00d0580b Synchronize the height of the preview panel for all open databases 2017-11-02 19:09:36 +02:00
thez3ro
0e6fedc056
fix group parent, add details update by keyboard 2017-10-26 12:19:23 +02:00
thez3ro
1a87e30b95
add preview panel for entries and groups 2017-10-26 12:19:23 +02:00
Louis-Bertrand Varin
055ba4f14e Q_NULLPTR -> nullptr 2017-10-25 10:15:37 -04:00
Louis-Bertrand Varin
ecfbad0443 Disable reload prompt when db is locked 2017-10-24 20:26:02 -04:00
frostasm
f38fe5a9dd Disable automatic hiding of an information message for YubiKey 2017-10-19 22:22:10 +03:00
Bernhard Rieder
6d569a86f9 added autoopen functionality (#477) 2017-10-09 13:26:24 +02:00
Jonathan White
df3051038e Clear database open dialog before and after merging a database (#958) 2017-09-23 11:43:29 -04:00
Jonathan White
6dfeea1980
Merge remote-tracking branch 'origin/develop' into release/2.2.0 2017-06-21 17:20:57 -04:00
Weslly
7438d6db18 Change text color of search label 2017-06-21 07:23:53 -04:00
Weslly
719323e9c3 Add option to limit search to current group 2017-06-21 01:01:50 -03:00
thez3ro
a53b111182
Update and fix copyright headers 2017-06-14 15:54:43 +02:00
Toni Spets
6f4b5fc71a 🔒 Fix search information leak 2017-05-28 18:08:38 +03:00
Weslly
bf57a28654 Add TOTP support 2017-05-03 20:55:14 -03:00
Vladimir Svyatski
75c16d1cbb Add requested source code changes 2017-04-21 18:07:57 +03:00
Vladimir Svyatski
dea65b637c Add context menu entry to clean the Recycle Bin in databases
This implements the feature request (issue) #503.
2017-04-21 15:41:58 +03:00
seatedscribe
06bbd6e066
Get rid of Q_{EMIT,SLOTS,SIGNALS} 2017-03-16 21:46:53 +01:00
seatedscribe
3fcf342fbc Merge remote-tracking branch 'upstream/develop' into feature/import-csv-format 2017-03-16 21:25:38 +01:00
thez3ro
0e5a1cc8e4
resolve placeholders for custom attributes 2017-03-16 20:38:56 +01:00
thez3ro
e3602e3c75
fix regex for placeholders, fix #402, add regression test 2017-03-16 20:32:29 +01:00
Janek Bevendorff
15dd783d2c
Merge branch 'develop' into feature/yubikey 2017-03-10 18:01:14 +01:00
Janek Bevendorff
8d487d31a4
Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
Janek Bevendorff
3c1271b1c4
Merge branch 'develop' into feature/yubikey 2017-03-06 13:49:48 +01:00
seatedscribe
a7e358c27d Syntax style, spaces and pretty indentation 2017-03-05 21:27:29 +01:00
seatedscribe
afdf02b4be Implement import of databases in CSV (Comma Separated Values) format (i.e. from other password managers) 2017-03-05 21:27:29 +01:00
Ryan Matthews
1fe75f9420 Add feature to handle references, resolves #75
- Create popup for clone options
  - Add ability to resolve references for autotype/http/copying
2017-03-04 19:49:33 -05:00
Louis-Bertrand Varin
b2fa6fca82 Fixes crash when deleting in search mode. 2017-03-04 12:19:18 -05:00
Janek Bevendorff
3230206b69
Merge branch 'develop' into feature/yubikey 2017-02-25 22:04:57 +01:00
Janek Bevendorff
1f6f7b614c
Merge branch 'release/2.1.3' into develop 2017-02-25 04:20:08 +01:00
Janek Bevendorff
311e7802e5 Don't show error message when trying to reload a locked database 2017-02-25 03:15:32 +01:00
Janek Bevendorff
e25e7ff4a2
Merge branch 'develop' into feature/yubikey 2017-02-25 01:09:59 +01:00
Janek Bevendorff
2721317fc3
Block and unblock autoreload in timed mutex style to prevent a double challenge when saving the database and the YubiKey requires user interaction 2017-02-24 18:43:15 +01:00
Janek Bevendorff
7abebabf4f
Rework general settings page 2017-02-22 15:36:37 +01:00
Janek Bevendorff
e0e6f2b8e9
Merge branch 'release/2.1.2' into develop 2017-02-17 04:03:12 +01:00
Janek Bevendorff
6dcb83f913 Disable 'Cancel' button on ChangeMasterKeyWidget when setting an initial password for a new database, follow-up to #302 2017-02-17 00:09:36 +01:00
Janek Bevendorff
41d5111684
Use KMessageWidget also for new error messages 2017-02-10 02:26:10 +01:00
Pedro Alves
13c85cdfcb
Replace MessageBox with MessageWidget in remaining classes.
Chnage to one method to set MessageWidget text passing type as
parameter.
Only messages with questions requiring user input reamin using
MessageBox dialog.
Use signal/slots to set message in MessageWidget and hide message,
signal/slots only used when required.Maybe need to change all calls to
signals/slots in the future.
2017-02-10 02:26:00 +01:00
Janek Bevendorff
26ff528a85
Merge branch 'meta/release-preparation' into release/2.1.1 2017-02-06 23:27:05 +01:00
Janek Bevendorff
75eb0c6951 Properly HTML-escape strings with user-defined contents in message boxes (#247)
* Properly HTML-escape strings with user-defined contents in message boxes, resolves #236

* Also escape group names in EditWidget title
2017-02-06 14:23:51 -05:00
Janek Bevendorff
a3fd3205a9 KeePassX PR Migration: #190 Search for Group Names (#168)
* Search Group details in addition to entry details; feature parity with KeePass
* Remove assertions to prevent crashes in Debug mode when search result is empty
2017-01-28 11:27:20 -05:00
Janek Bevendorff
3e6f76826b
Don't show cmd:// prefix in confirmation dialog 2017-01-28 14:24:33 +01:00
Janek Bevendorff
01e9d39b63
Add 'Remember my choice' checkbox
Allow user to store preference when asked whether to execute command, resolves #51
2017-01-28 14:18:43 +01:00