Commit Graph

751 Commits

Author SHA1 Message Date
Carlo Teubner
bdee748a6a Make Entry::m_tmpHistoryItem a QScopedPointer (#2524)
* Make m_tmpHistoryItem a QScopedPointer

Most of the time, `m_tmpHistoryItem` should be null by the time an
`Entry` is destroyed. However, if a caller ever calls `beginUpdate()`
without later calling `endUpdate()` -- perhaps because an exception was
throw in the meantime -- it may not be null. This change avoids a memory 
leak in that case.

Found via https://lgtm.com/projects/g/keepassxreboot/keepassxc/alerts
2018-12-01 16:08:55 -05:00
Gianluca Recchia
e81841550b
Correct checks for containers' emptiness 2018-11-28 18:29:15 -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
Gianluca Recchia
b39522f874
Avoid allocating temporary containers 2018-11-28 18:29:05 -05:00
louib
fff0f11b33 Adding --quiet option to the CLI. (#2507) 2018-11-28 11:24:12 -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
340076974e
Correct logic error in EntrySearcher and add more tests 2018-11-17 09:55:57 -05:00
Jonathan White
880c3aeb34
Add search help pop-up
* Support ! modifier (same as '-')
* Create reusable PopupHelpWidget as self-contained popup that can
be positioned around a parent widget and will follow the movement
and sizing of the window
* Eliminated KEEPASSXC_MAIN_WINDOW macro and replaced with
getMainWindow() function
* Add tests to cover search help show/hide
2018-11-17 09:04:15 -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
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
louis
156b480f93 Better error message for invalid db file 2018-11-09 19:09:55 -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
379c41d20c
Reduce unnecessary copies using move semantics 2018-10-31 15:16:04 +01:00
Gianluca Recchia
896a66e6d8
Improve readability and type-safety
Use nullptr instead of 0 or NULL to initialize a null pointer. In some
cases, readability was enhanced by replacing 0 with more meaningful
values according to the type of the pointer being initialized.
2018-10-31 15:16:04 +01:00
Gianluca Recchia
da9afd3f6f
Reduce number of unneeded copies
This patch aims at reducing the number of copies for obejcts that could
be referenced rather than copied, because they're not modified during
the computation.
2018-10-31 15:16:04 +01:00
Gianluca Recchia
a67a574b89
Reduce function call overhead
The arg() function of the QString class has a variable length argument
which allows to reduce the number of chained calls to the same function.
With proper formatting, readability is not affected.
2018-10-31 14:23:06 +01:00
Gianluca Recchia
4ac1601696
Replace old for-loops with range-based for-loops 2018-10-31 14:23:06 +01:00
Gianluca Recchia
4876beabed
Improve performance of a few for-loops
Some for-loops needlessly copied the collection they were looping over.
2018-10-31 14:23:06 +01:00
Gianluca Recchia
4e1d3bfd73 Extract the OS event filter implementation (#2422) 2018-10-30 08:46:12 -04:00
Jonathan White
fa687f246e
Fix issues with group functions (#2410) 2018-10-30 08:42:35 -04: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
Chih-Hsuan Yen
6ea869bb18 Replace all .svgz in paths to .svg (#2405) 2018-10-24 08:08:37 -04: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
Janek Bevendorff
113c8eb702 Add CLI tests and improve coding style and i18n
The CLI module was lacking unit test coverage and showed some severe
coding style violations, which this patch addresses.

In addition, all uses of qCritical() with untranslatble raw char*
sequences were removed in favor of proper locale strings. These are
written to STDERR through QTextStreams and support output
redirection for testing purposes. With this change, error messages don't
depend on the global Qt logging settings and targets anymore and go
directly to the terminal or into a file if needed.

This patch also fixes a bug discovered during unit test development,
where the extract command would just dump the raw XML contents without
decrypting embedded Salsa20-protected values first, making the XML
export mostly useless, since passwords are scrambled.

Lastly, all CLI commands received a dedicated -h/--help option.
2018-10-19 21:49:54 +02: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
Darwin Shameran
b40e5686dc Add option to not show password placeholder when field is empty (#2333)
* Add option to not show password placeholder when field is empty
* Set the option to show an empty passwd field instead of dots to true by default
2018-09-29 07:44:23 -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
Weslly
f8b997bcf4 Add support for opening file:// urls (#2311)
* Add support for opening file:// urls
* Open file urls without file:// scheme
2018-09-20 23:49:56 -04:00
Kyle Kneitinger
341635f6bd Replace Google with DuckDuckGo as the optional fallback favicon fetcher (#2309)
* Replace Google with DuckDuckGo for optional fallback favicon fetch URL
Modify the work initially done in #36, and most recently modified in #1786,
to use DuckDuckGo's https://icons.duckduckgo.com/ip3/www.example.com.ico
favicon endpoint.

Fixes #2258

* Close failed favicon fetch progress bars

Name the UrlFetchProgressDialog() with the corresponding URL in order to
be identified by name by its parent when the failed request is handeled
in EditWidgetIcons::fetchFinished(). fetchFinished() retrieves the
relevant UrlFetchProgressDialog() and calls close() on it.

Fixes: #2265
2018-09-20 21:52:51 -04:00
brad2014
32456e1b24 Fix typo in Group::findGroupByPath found by sonarcloud (#2233)
* Group::findGroupByPath now limited to search from root (matching current usage)
* Factors out Group::findGroupByPathRecursion (on prenormalized strings).
2018-09-18 22:44:39 -04: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
b4d806ad41
Fixed issues with initial commit 2018-07-06 22:23:52 -04:00
pasdam
ad4423d226
Replaced Uuid with QUuid 2018-07-06 22:23:49 -04:00
Vladimir Svyatski
5d3b6953af Merge remote-tracking branch 'upstream/develop' into develop 2018-06-27 23:40:20 +03: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
Michal Kaptur
486b99b39d Add some unit tests to Tools
Clean up and test 3 methods from Tools:
- humanReadableFileSize
- isHex
- isBase64
2018-05-22 09:28:54 +02:00
Vladimir Svyatski
30ccc102d2 Merge remote-tracking branch 'upstream/develop' into develop 2018-05-10 22:34:38 +03:00
Jonathan White
aae6d09fd3
Merge branch 'master' into develop
Conflicts:
	src/CMakeLists.txt
	src/autotype/xcb/AutoTypeXCB.cpp
	src/browser/BrowserAction.cpp
	src/browser/BrowserService.cpp
	src/browser/BrowserService.h
	src/browser/BrowserSettings.h
	src/browser/NativeMessagingHost.cpp
	src/browser/NativeMessagingHost.h
	src/gui/EditWidgetIcons.cpp
	src/gui/EditWidgetIcons.h
	src/gui/MainWindow.cpp
	src/proxy/NativeMessagingHost.cpp
	tests/TestOpenSSHKey.cpp
2018-05-07 23:24:30 -04:00
Jonathan White
9ed2a74421 Configurable global autotype start delay 2018-05-06 20:54:11 +02:00
Vladimir Svyatski
bbfac92672 Add requested changes to PR #1819. 2018-04-10 08:27:23 +03:00
Weslly
586961013d
Disable clang-format on Tools.cpp include order 2018-04-05 08:59:42 -03:00
Weslly
9b6c589b9c
Fix build error on mac introduced on 8324d03f0a 2018-04-04 23:09:02 -03:00
Louis-Bertrand Varin
8324d03f0a Formatting the code. 2018-03-31 16:01:30 -04:00
Louis-Bertrand Varin
3eb917055e Add ClangFormat exceptions 2018-03-31 12:15:09 -04:00
Janek Bevendorff
e92d5e80ee
Merge branch 'release/2.3.2' into develop 2018-03-18 01:14:42 +01:00
Edward Jones
e66adfbf68 Make more strings translatable
Includes making certain modifiers (like "[locked]") positionable, in
case languages put this before the word
2018-03-13 20:41:12 +00:00
Edward Jones
3def6a3bc4 Fix weird base strings and reduce concatenation 2018-03-13 20:40:39 +00:00
Thomas Luzat
082ecc3f37 Fix dark tray icon option making all icons dark
Introduces a separate path for tray icons which are neither locked nor
unlocked.

Closes #1556.
2018-03-08 21:34:15 +01:00
thez3ro
10170a555e add test case for recursive placeholders 2018-03-06 15:56:27 +01:00
Benoit Mortgat
18628612b2 Allow references in part of a field
When a field value is of the form ...{REF:...}...
Then:

* Auto-type does not work with that field
* References to this field are not properly resolved

This commit fixes both issues.
2018-03-05 23:31:29 +01:00
Janek Bevendorff
2fd2085bb5 Fix qtbase translations not being loaded (regression) 2018-03-04 21:01:00 +01:00
Janek Bevendorff
ee8499f65c Do not delete MacPasteboard instance on exit, resolves #1543 2018-03-03 02:33:43 +01:00
Janek Bevendorff
199f0932bf Add additional KDBX4 upgrade tests for composite key integrity 2018-03-01 19:26:18 -05:00
Janek Bevendorff
4c8d426f23 Use copy instead of rename for unsafe saving on Linux
Resolves #1511
See https://bugreports.qt.io/browse/QTBUG-64008
2018-02-27 21:05:13 +01:00
Janek Bevendorff
e1558d6300 Avoid double file extension replacement in backup filename 2018-02-27 15:53:31 +01:00
Janek Bevendorff
5410d78bbb Properly save custom header data
Ensure adding custom data upgrades to KDBX4
Implement review feedback
2018-02-21 13:23:14 +01:00
Christian Kieschnick
0b54710734 Introduced missing CustomData on Group and Entry
Introduce missing CustomData-attributes of KDBX4 format to allow
storing of plugin data for groups and entries - adopt Metadata to use
the same storage mechanism
Add simple view for CustomData as part of EditWidgetProperties
Tracking of CustomData-Modification using SIGNAL-SLOT update-mechanism
2018-02-21 13:23:14 +01:00
Janek Bevendorff
4c52aa9c88 Check maxDepth on placeholder resolution to avoid infinite recursion 2018-02-17 18:04:29 +01:00
thez3ro
c5dd64d18a Resolve reference in entry field, prevent recorsive loop, fix EditEntry association bug 2018-02-17 18:04:29 +01:00
Janek Bevendorff
ab3775d4c5 Fix regression introduced in 6723f42
Use of QString for static DefaultSeparator lead to crashes on Windows
2018-02-11 15:12:20 +01:00
thez3ro
1bfbb9242c
fix cli commands, translations and codestyle 2018-02-07 17:35:20 +01:00
thez3ro
6723f4215a
centralize every password generator default option. add extended ASCII to XC_HTTP generator 2018-02-07 17:35:20 +01:00
thez3ro
e57a2e0fa9
add default charset when not specified
explicitly state the wordcount default value
2018-02-07 17:35:20 +01:00
thez3ro
a76c92ed9a
change inAutotype logic, preventing multiple autotype call 2018-02-04 23:13:15 +01:00
thez3ro
a9479fd662
refactor autotype sequences and entry-point functions 2018-02-04 23:13:15 +01:00
thez3ro
b5cabbeb43
add support for multiple autotype sequence, fix #559 2018-02-04 23:13:15 +01:00
thez3ro
065a85e05c
fix effective autotype sequence 2018-02-04 23:13:15 +01:00
Janek Bevendorff
a8471f1617 Re-add QStandardPaths include to fix compilation error on macOS,
resolves #1455
2018-02-04 22:56:31 +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
17e3f1c21f Create history item when setting up a TOTP seed, resolves #1445 2018-02-01 19:16:17 +01:00
Jonathan White
6a4b275d40
Minor changes to address comments 2018-01-28 11:31:56 -05:00
Jonathan White
3db9a86a4c
After 3 failed saves, offer to disable safe saves
* User is prompted to disable safe saves after three failed attempts
* Completely retooled basic settings to group settings logically
* Added setting for "atomic saves"
2018-01-28 11:28:39 -05:00
Jonathan White
d7f408e455
Correct saving files to DropBox/Drive/OneDrive
* Replaces QSaveFile with QTemporaryFile
* Added backup before save config setting
* This method may cause data loss (see comments)
2018-01-28 11:28:33 -05:00
Janek Bevendorff
8dd6cdeb69
Fix history truncation based on max size and extend unit tests 2018-01-23 02:31:29 +01:00
Christian Kieschnick
258438f01f
Fix code-style issues
Fixed issues pointed out during review
2018-01-23 00:57:04 +01:00
Christian Kieschnick
943dc6cdd6
Add tests for modified, fix history for autotype
Added tests to ensure #1387 works
Fixed issue detected during testing - AutoTypeAssociations were not
pushed to history
2018-01-23 00:57:01 +01:00
Christian Kieschnick
045f157a63
Add extend entry-size calculation (resolved #1387)
Extended the calculation for the size of history items to match KeePass2
Small refactoring regarding readability in EntryAttachements
2018-01-23 00:56:58 +01:00
Janek Bevendorff
0f5307437c
Fix multiple TOTP issues, resolves #1360
- Fix crash when deleting TOTP entry
- Fix memory leak when selecting TOTP entries
- Fix TOTP update timeout on DetailsWidget
- Fix TOTP settings attributes not being applied before first call to totpSeed()
2018-01-23 00:22:04 +01:00
Janek Bevendorff
bbc5ff5103 Use actual full en_US translation for English and drop en_plurals file 2018-01-21 15:54:46 +01:00
Janek Bevendorff
8da3efa2c2 Add disambiguation info to source strings 2018-01-21 15:54:46 +01:00
Janek Bevendorff
3605bec8e0 Change 'unget' error message to untranslatable qWarning 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
Janek Bevendorff
b04c8c2b6e
Explicitly support AES-KDF in KDBX4 and don't convert KDBX4 files with AES-KDF back to KDBX3 when saving 2018-01-13 14:25:00 -05:00
Janek Bevendorff
df728083cc
Add challenge response to key before transformation, resolves #1060
* Re-implement KDBX4 challenge-response key assembly with transform
seed instead of master seed
2018-01-13 14:24:59 -05: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
Jonathan White
738f870e70
Correct regression in database modification signal 2018-01-13 14:24:43 -05:00
Jonathan White
542ee42313
Add Argon2Kdf and enable parameters in db settings
Note: This implementation is not yet connected to the
database itself and will corrupt existing kdbx3 db's.

* Implemented memory and parallelism parameters for Argon2Kdf
* Using libargon2; libsodium does not support Argon2d algorithm
* Moved basic rounds parameter into Kdf class
* Reimplemented benchmark algorithm; previous was utterly broken
2018-01-13 14:23:30 -05:00
Jonathan White
2866bc626a
Removed dead code 2018-01-13 14:23:29 -05:00
Janek Bevendorff
15648991fc
Refactor Kdf class, remove fields concept 2018-01-13 14:23:28 -05:00
Janek Bevendorff
d00ccd2eb5
Add AsyncTask helper functions 2018-01-13 14:23:27 -05:00
Janek Bevendorff
0d6ca0945b
Reformat code, fix minor style issues, make kdf() getter const 2018-01-13 14:23:27 -05:00
Janek Bevendorff
d1a19a1009
Refactor Endian namespace 2018-01-13 14:23:27 -05:00
angelsl
23347b392f
Fix typo in Endian and add uint{16,32,64}ToBytes 2018-01-13 14:23:24 -05:00
angelsl
2e19af5032
Pull out KDFs into their own class hierarchy
In preparation for multiple KDFs in KDBX 4
2018-01-13 14:23:20 -05:00
varjolintu
06518c5736 keepassxc-browser 2018-01-04 21:42:20 +01:00
Janek Bevendorff
71f38f17cd Restrict Q_OS_UNIX ifdefs to non-Mac platforms 2017-12-27 20:35:05 +01:00
Rafael Sadowski
e29d3497eb s/Q_OS_LINUX/Q_OS_UNIX/g
Enable support for UNIX like OS.
2017-12-27 20:35:05 +01:00
Janek Bevendorff
23f8d58859 Add default value for DarkTrayIcon option and fix style issues 2017-12-27 16:46:56 +01:00
Vlad N
4fa00b74ad Moved dark icon logic into FilePath. 2017-12-27 16:44:26 +01:00
Vlad N
55271311c4 Added dark tray icon parameter to settings. 2017-12-27 16:44:25 +01:00
frostasm
0c200d360b Add attachments tab to details view 2017-12-24 20:10:12 +02:00
Janek Bevendorff
5b525eb9ca Refactor Translator class to load qtbase translations from local directory if available 2017-12-23 17:47:46 +01:00
Aleksa Sarai
9f8943c89b keepassxc-cli show: resolve references in output (#1280)
* core: database: make UUID searching case-insensitive

4c4d8a5e84 ("Implement search for reference placeholder based on
fields other than ID") changed the semantics of searching-by-reference
in KeePassXC. Unforuntately it contained a bug where it implicitly
became case-sensitive to UUIDs, which broke existing databases that used
references (especially since the default reference format uses a
different case to the UUID used while searching).

The tests didn't catch this because ->toHex() preserves the case that it
was provided, they have been updated to check that UUIDs are case
insensitive.

* cli: show: resolve references in output

Previously, `keepassxc-cli show` would not resolve references. This
would make it quite hard to script around its output (since there's not
interface to resolve references manually either). Fix this by using
resolveMultiplePlaceholders as with all other users of ->password() and
related entry fields.

Fixes: keepassxreboot/keepassxc#1260

* tests: entry: add tests for ref-cloned entries

This ensures that the most "intuitive" current usage of references
(through the clone feature of the GUI) remains self-consistent and
always produces the correct results. In addition, explicitly test that
case insensitivity works as expected. These should avoid similar
regressions in reference handling in the future.

* http: resolve references in AccessControlDialog

The access control dialog previously would not show the "real" username
or "real" title when asking for permission to give access to entries.
Fix this by resolving it, as we do in many other places.

Fixes: keepassxreboot/keepassxc#1269


Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2017-12-17 10:44:12 -05:00
Mike Woudenberg
938cf8fce2 Adds listener for Gnome specific screensaver activation 2017-12-03 13:17:43 +01:00
frostasm
c4bbb76da4 Remove "Can't resolve placeholder" warning (#1137) 2017-11-30 20:07:16 +02:00
frostasm
d99dee9c40 Small refactoring related to references placeholders 2017-11-30 20:07:16 +02:00
Martin Unzner
b44092ac43 Add capability to resolve UUID 2017-11-30 20:07:16 +02:00
frostasm
4c4d8a5e84 Implement search for reference placeholder based on fields other than ID 2017-11-30 20:07:16 +02:00
frostasm
8c7ef64fab Show "Can't resolve placeholder" warning only in debug mode 2017-11-30 20:07:16 +02:00
Weslly
5fa76dfd66
Remove ShowToolbar from config 2017-11-26 22:59:48 -02:00
Louis-Bertrand Varin
2cd5006260 Formatting 2017-11-21 14:06:40 -05:00
Louis-Bertrand Varin
94ea323836 Extracting default clone flags. 2017-11-21 14:06:40 -05:00
Louis-Bertrand Varin
2ff56fe86c Only updating custom group icon if set. 2017-11-21 14:06:40 -05:00
Louis-Bertrand Varin
9603c91877 Merge : Synchronising groups. 2017-11-21 14:06:40 -05:00
Weslly
19ac36b965
Change QTotp class name to Totp 2017-11-20 22:25:09 -02: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
806248ebd4
Review fixes 2017-11-20 16:50:56 -02:00
Weslly
dc7322cc4a
Improve macOS pasteboard handling 2017-11-20 16:09:42 -02:00
Adolfo E. García
cc6be754f7 Remove deprecated Optional.h 2017-11-12 12:09:35 -06:00
Adolfo E. García
c9895dd5c7 Improve Base32.cpp 2017-11-12 12:09:35 -06:00
frostasm
f34b090b42 Add support for working with multiple entry attachments at once 2017-11-12 17:41:53 +02:00
Jonathan White
f3d85ae219
Cleaned up url display code 2017-10-26 12:19:23 +02:00
Jonathan White
b9fd609bb2
Resolve placeholders in entry details url 2017-10-26 12:19:23 +02:00
thez3ro
71ae2a3458
remember last selected tab, hide passwords by default 2017-10-26 12:19:23 +02:00
thez3ro
eb65822665
layout update 2017-10-26 12:19:23 +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
Francois Ferrand
263bee3c09 Detect session lock on Xfce/XUbuntu 16.04
The current code does not work with XUbuntu 16.04, which uses
light-locker to lock the screen.

I am not using a screensaver, but I suspect the screensaver activation
may have been detected by the existing events, and using it could thus
mask the issue.
2017-10-25 17:09:00 +02:00
Janek Bevendorff
b510243dd8
Merge branch 'release/2.2.2' into develop 2017-10-21 22:23:27 +02:00
Adolfo E. García
86cd2c09a4 Improve readability of code 2017-10-21 13:15:02 +02:00
Adolfo E. García
f1d99dd0ed Improve testing of Base32 2017-10-21 13:15:02 +02:00
Adolfo E. García
c731f8e5c0 Fix bug in Base32::decode and add bounds check
The bug that was fixed, was affecting how the number of bytes of decoded data was  calculated and thus, even though it didn't truncate the result, it was causing the array to be resized unnecessarily.
2017-10-21 13:15:02 +02:00
Adolfo E. García
24f560aaa2 Replace Optional with QVariant 2017-10-21 13:15:02 +02:00
Adolfo E. García
d21ae0f94a Fix for loop's variable increment style 2017-10-21 13:15:02 +02:00
Adolfo E. García
95b0ad15ef Fix code style 2017-10-21 13:15:02 +02:00
Adolfo E. García
19eb6a8a60 Add new Base32 implementation 2017-10-21 13:15:02 +02:00
Janek Bevendorff
190d3a1da9 Merge pull request #1078 from frostasm/implement-recursive-resolving-for-placeholders
Implement recursive resolving for placeholders
2017-10-19 21:50:57 +02:00
Janek Bevendorff
8592f7e672 Merge branch 'release/2.2.2' into develop 2017-10-19 21:45:49 +02:00
frostasm
f0fcc19915 Implement recursive resolving for placeholders 2017-10-19 22:40:26 +03:00
frostasm
e81d8beb19 Refactor Entry::resolvePlaceholder function 2017-10-19 22:40:26 +03:00
frostasm
5e0df62d7a Add processing of the url placeholders 2017-10-19 22:40:26 +03:00