Commit Graph

3538 Commits

Author SHA1 Message Date
sajolida
16d32c59ba Give visual feedback while starting (#2593)
Adds  StartupNotify to the .desktop file to provide proper launch feedback.
See freedesktop spec https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
2019-01-11 09:26:51 +01:00
Jonathan White
d11bb247b3 Simplify CMakeLists 2019-01-10 07:57:13 -07:00
Christian Kieschnick
c954c95da4 Fixed BulkFileWatcher multi signal problem
BulkFileWatcher emitted multiple file change signals (like
QFileSystemWatcher) for the watched files. Introduced a delay by waiting
until the end of the event loop to aggregate signals emitted by
QFileSystemWatcher before emitting custom signals.
2019-01-09 16:25:35 +01:00
Christian Kieschnick
a978880b0b Fixed QuaZip for windows, renaming
QuaZip should now usable under windows (fixed include in FindQuaZip)

Renamed the representation from secure and unsecure to signed and
unsigned
2019-01-07 12:02:21 +01:00
Christian Kieschnick
383b8b77eb Implemented feedback regarding build and ui
Changed build options to use only WITH_XC_KEESHARE and
WITH_XC_KEESHARE_SECURE - WITH_XC_KEESHARE_INSECURE remains as internal
variable to highlight differences (may allow to build schemes later)

Message widget in KeeShare settings for groups is not closeable anymore
2019-01-07 10:38:38 +01:00
Jonathan White
f46062cc4a
Minor bug fixes and formatting 2019-01-06 11:06:41 -05:00
Christian Kieschnick
2bfe66e840 Another attempt to make GCC happy 2019-01-04 12:38:34 +01:00
Christian Kieschnick
51d63f0e83 Fixed GCC issues for const initialization
Fixed issues reported by GCC for initialization of const variables
2019-01-04 12:28:36 +01:00
Christian Kieschnick
b204451d06 More ci issues (missing initialize for const)
Fixed issues detected in TestSharing
2019-01-04 12:11:20 +01:00
Christian Kieschnick
6e25da6a19 Fixed issues detected by test suite and ci
Fixed serialization for KeeShareSettings::ScopedCertificate
Fixed tests for KeeShareSettings serialization
Fixed tests Cli features - tests translation for recycle bin since the
tests are executed with the system locale
Fixed initialization issue in ShareObserver
2019-01-04 12:04:46 +01:00
Christian Kieschnick
ba604390d2 Fixed ci builds
ubuntu:14.04 does not have quazip5 libraries in the standard repository, therefore only insecure builds are created using the ci server
2019-01-04 11:03:15 +01:00
Christian Kieschnick
080b02e9d5 KeeShare uses only one flag - checks for QuaZip
Changed flag for KeeShare to
* enable insecure sharing in all cases
* enable secure sharing if QuaZip was found
2019-01-04 09:33:00 +01:00
Christian Kieschnick
3d02013513 Changed KeeShareSettings to explicitly ask
KeeShareSettings now allow to trust, untrust or ask on next import from
a specific publisher with a specific container
2019-01-03 18:22:41 +01:00
Christian Kieschnick
2e18388825 Fixed bug in FileWatcher, improved unsafe sharing
BulkFileWatcher didn't recognize added files in observed directory

Improved UI for unsecured sharing only (hide certificate ui, added
warnings and adjusted indicators)
2019-01-03 17:50:36 +01: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
Christian Kieschnick
52dcc2855e Fixed signal slot connections
Fixed connection to renamed CustomData::customDataModified() signal
Fixed connection to renamed Database::databaseModified() signal
Fixed connection to renamed Group::groupModified() signal
2019-01-02 09:14:34 -05:00
Jonathan White
21de6f6163
Merge branch 'develop'
Conflicts:
	src/core/Tools.cpp
	src/sshagent/SSHAgent.cpp
2018-12-30 16:32:57 -05:00
JTL
dd5665c656 Multiple macOS fixes and include keepassxc-cli in DMG (#2165)
* Fixes including keepassxc-cli when building KeePassXC dmg on Mac.
resolves #1697
* Fix Qt search path and Properties display on macOS
* Simplify packaging POST_BUILD fixups
* Various fixes to get cli to run on macos
* Correct cli tests on macOS
* Several macOS related GUI test fixes
2018-12-28 18:32:25 -05:00
Jonathan White
b96b86bfa7 Cleanup and replumb back to functional state 2018-12-28 17:54:52 -05:00
George Shakhnazaryan
b1ff346f63 Allow Enter key to select recent DB on OS X
* Override `keyPressEvent`on WelcomeWidget on OS X to `openDatabaseFromFile`.

openDatabaseFromFile is already invoked via the QListWidget::itemActivated signal,
  but this signal doesn't fire on OS X for Enter.
QListWidget::itemActivated activates on an OS specific activation key. [1]
On Windows/X11, this is Enter, which lets the user easily
  navigate with just the keyboard.
On OS X, this is Ctrl+O, which is already bound to Open Database. This means that itemActivated cannot fire via the keyboard.

Per StackOverflow [2], the recommended solution is to catch
the enter/return key press manually.

This seems like a common problem with Qt. [3] [4]

[1] https://doc.qt.io/archives/qt-4.8/qlistwidget.html#itemActivated
[2] https://stackoverflow.com/questions/31650780/when-does-a-qtreeview-emit-the-activated-signal-on-mac
[3] https://forum.qt.io/topic/36147/pyside-itemactivated-not-triggered-on-mac-os-x-with-return-key
[4] https://github.com/dolphin-emu/dolphin/pull/6099
2018-12-25 16:00:02 -05:00
Toni Spets
c34b0069ff SSH Agent: Add support for OpenSSH for Windows (#1994)
* Fixed missing includes in Bootstrap.cpp
2018-12-25 14:28:02 -05:00
varjolintu
5488f1bfc3 Switch browser integration to use native raising of windows 2018-12-24 18:17:56 -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
louib
8ac9d0a131 Add create command to keepassxc-cli (#2540)
* Add tests for CLI::Create
2018-12-19 23:10:46 -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
varjolintu
a070f1bce7 Handle retrieving credentials from HTTP Basic Auth 2018-12-11 15:34:32 -05:00
louib
cb3c4893dc Move unlockDatabase to CLI/Utils (#2539)
Move unlockDatabase from Database to to cli/Utils
2018-12-11 16:49:51 +01:00
Carlo Teubner
b6eeabab5e KeePass2Reader: fix error message logic (#2523) 2018-12-02 10:05:54 -05:00
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
Carlo Teubner
1af293847c LayeredStream dtor: fully qualify 'close()' call
`close()` is a virtual function. Since we are calling it from a
destructor, make it clear that we are specifically calling the base
class (`QIODevice`) implementation, as opposed to an implementation in
any derived class.

[Found by lgtm.com](https://lgtm.com/projects/g/keepassxreboot/keepassxc/alerts)
2018-12-01 14:07:10 -05:00
Janek Bevendorff
9be538a5f6
Update translations from Transifex 2018-12-01 10:54:55 +01:00
Jonathan White
294188dea1
Fix typo in EditEntryWidget after code cleanup #2 2018-11-28 21:51:57 -05:00
Jonathan White
c66f293f1e
Merge pull request #2443 from brainplot/code-cleanup
Code cleanup and performance improvements - Part 2
2018-11-28 20:03:33 -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
f9625189cb
Fix typo in parameter name
A typo in a parameter name caused an inconsistency between declaration
and definition of a function.
2018-11-28 18:29:14 -05:00
Gianluca Recchia
a9fa8915d9
Use QVariant::toUrl() instead of QVariant::value<QUrl>() 2018-11-28 18:29:14 -05:00
Gianluca Recchia
9d106d6bfc
Remove unused variables 2018-11-28 18:29:13 -05:00
Gianluca Recchia
b39522f874
Avoid allocating temporary containers 2018-11-28 18:29:05 -05:00
louib
49b82ea6a2 Global const for KeyFileOption (CLI) (#2505) 2018-11-28 16:15:15 -05:00
Jonathan White
1a2721529d Correct simultaneous saving with Yubikey
* Move mutex lock to right before challenge call and wait for up to 1 second for unlock
* Fix bug where ALREADY_RUNNING was interpreted as success and causing database corruption
2018-11-28 16:14:17 -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
louib
fff0f11b33 Adding --quiet option to the CLI. (#2507) 2018-11-28 11:24:12 -05:00
Lantizia
4e49de1afb Ability to set 7-digit TOTP codes from the UI (#2517) 2018-11-28 11:23:06 -05:00
Jonathan White
a67cac1322 Address comments 2018-11-24 17:31:20 -05:00
Jonathan White
4aab93084a Update Github templates 2018-11-24 17:31:20 -05:00
Kyle Kneitinger
a90a577ee1 Add favicon fetch button next to entry's url edit textbox (#2439)
When WITH_XC_NETWORKING is defined, create a QToolButton beside the Edit Entry -> Entry -> URL, which when pressed, acts as though the Edit Entry -> Icon -> Download Favicon button is pressed.  This button is disabled (grayed-out) when the URL text is empty, and enabled when the text is present.

Fixes #936

* Add favicon download button 
* Remove the progress dialog that appears when
downloading an entry's URL's favicon since (when working correctly) it disappears before it can be read. When downloading icons from the button
located next to the URL text box, display a message panel that confirms the download was a success.

* Do not show successful icon download msg if icon alread exists
2018-11-24 17:30:55 -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