Commit Graph

2422 Commits

Author SHA1 Message Date
Matthias Drexler
c669ecb4dd Replace deprecated foreground() by windowText() 2019-07-07 14:17:21 -04:00
Chih-Hsuan Yen
e1471cbd19 Fix building on Mac OS X < 10.12
This patch is inspired by a compatibility header in old WebKit. See
1262b1fbf8/Source/WTF/wtf/mac/AppKitCompatibilityDeclarations.h

Ref: https://github.com/keepassxreboot/keepassxc/issues/2899
2019-07-07 14:15:08 -04:00
Jonathan White
ce1f19cacc
Remove Carbon from Mac Auto-Type (#3347)
* Fix #3310
2019-07-03 14:43:10 -04:00
varjolintu
c27ee6aba8 Add setting for not displaying KeePassHTTP migration popup 2019-07-03 08:23:52 -04:00
Jonathan White
d12f15da92 Add warning prior to export of database
* Ensures user is aware that the exported data is unencrypted and vulnerable
2019-06-30 15:29:36 -04:00
Jonathan White
aac76ad407 Add ability to export database as HTML for printing 2019-06-30 15:29:36 -04:00
varjolintu
32e62faf39 Prompt to migrate KeePassHTTP settings only if Browser Integration is enabled 2019-06-30 11:07:25 -04:00
therealfarfetchd
12f42a555e Fix icon scaling for HiDPI displays (#3332)
* Only apply hidpi icons on Linux
2019-06-30 11:06:58 -04:00
Balazs Gyurak
f66e9191a9 Fix password visibility button state on database open 2019-06-29 18:39:24 -04:00
Balazs Gyurak
11dabfa1b7 Fix password generator properties initialization 2019-06-29 18:34:49 -04:00
Balazs Gyurak
8e248bbde6 Drop to background on copy feature 2019-06-29 07:34:41 -04:00
Jonathan White
d49e74c1f4 Add monospaced font option for Notes field 2019-06-28 22:23:57 -04:00
Balazs Gyurak
a0d1304bfc Move notes to General tab on Group Preview Panel (#3336) 2019-06-28 21:48:25 -04:00
Jonathan White
0e0cba653f CLI: add 'analyze' subcommand for offline HIBP breach checks
This new subcommand checks all passwords in the given database against a given list of SHA-1 password hashes. Such lists are available from the "Have I Been Pwned" project at https://haveibeenpwned.com/Passwords.

Note that this support offline checking only. The HIBP project also provides a web API for checking specific hash ranges; this is not currently supported.
2019-06-25 15:37:40 -04:00
Carlos Knippschild
bb2d7bca5a Fix build broken by Qt
Updating mingw-w64-x86_64-qt5 to version 5.12.4-2 caused EditEntryWidget to fail
building. Fixed that with proper includes. Also ran `make format` which revealed
one file in need of formatting.
2019-06-25 08:13:27 -04:00
Carlos Knippschild
41b2a013a7 Fix broken build with YubiKey disabled
Remove reference to DatabaseOpenWidget::checkChallengeResponse that was
removed in commit #3287.
2019-06-24 08:58: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
Jeff
a22e8a1f40 Add MinimizeOnUrlOpen feature 2019-06-23 12:04:24 -04:00
Balazs Gyurak
6dcd00b609 Rework the Entry Preview panel (#3306)
* Add notes to General tab
* Combine Attributes and Attachments tabs into Advanced
* Remove extra viewTotpWidget
* Shrink minimum size of preview panel
2019-06-23 10:02:02 -04:00
Janek Bevendorff
5492b5c4f6
Redesign database unlock widget. (#3287)
With this change we get rid of the confusing key component checkboxes.
Now a component is either there or not (if left empty). There is
no redundant distinction between "unset" and "emtpy" anymore.
For compatibility with older databases that have "empty" passwords,
KeePassXC will ask if the user wants to retry with an empty password
if unlocking failed and the password field was left blank.

Besides these functional changes, the widget's layout has been
rearranged to be more compact, less stretched out (e.g. input fields
do not fill the full window width anymore), and more user-friendly
by providing a help tooltip for the hardware key field and accessible
descriptions for screen readers.
2019-06-22 18:00:31 +02:00
Jonathan White
eb9371091a KeeShare settings fixes
* Moved KeeShare Quiet Success message setting to the KeeShare portion of the application settings
* Removed an assert that caused the application to crash in debugging when a share file could not be found
* Corrected database settings security icon
2019-06-22 11:22:37 -04:00
Tobias Kortkamp
ef3c2daef1 Unbreak build on FreeBSD (#3304)
* Unbreak build on FreeBSD

```
In file included from src/core/Alloc.cpp:24:
/usr/include/malloc.h:3:2: error: "<malloc.h> has been replaced by <stdlib.h>"
 ^
src/core/Alloc.cpp:65:28: error: use of undeclared identifier 'malloc_usable_size'
    ::operator delete(ptr, malloc_usable_size(ptr));
                           ^
2 errors generated.
```

Non-standard APIs like `malloc_usable_size()` [1] are defined in
`malloc_np.h` on FreeBSD, so use it instead of `malloc.h` there.

[1] https://man.freebsd.org/jemalloc(3)

* Allow Browser HostInstaller to work on FreeBSD and other OS's

* Drop custom GNUInstallDirs cmake module and use cmake's own module

It seems to be an outdated version and cmake generally provides it
itself, so there should be no need for keepassxc to provide its own
custom version.

On FreeBSD this fixes the issue that man pages were installed into
the wrong directory, i.e., `/usr/local/share/man` vs `/usr/local/man`
as per FreeBSD's current packaging policy.

Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org>
2019-06-22 08:18:47 -04:00
Christian Kieschnick
07da5de880 Extract ShareImport and ShareExport
Moved import/export functionality out of ShareObserver into tooling classes ShareImport and ShareExport
2019-06-19 22:35:12 -04:00
Christian Kieschnick
37c53f326c Enforce ShareObserver to resolve relative paths
ShareObserver now uses paths which are resolved relative to the referencing database.
2019-06-19 21:31:26 -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
AndrolGenhald
e40f10657d Fix keepassxc-browser password entropy display (#3107)
* Pass correct entropy amount to keepassxc-browser instead of amount of bits for both password and passphrase.
* Rename json key from "login" to "entropy" (keeping "login" key for backwards compatibility).

* Also make some changes to entropy calculation methods:
  - Rename PassphraseGenerator::calculateEntropy to estimateEntropy
  - Rename PasswordGenerator::calculateEntropy to estimateEntropy
2019-06-19 20:40:41 -04:00
Tobias Schwackenhofer
7ceca8ff3c Enable copy & paste from AutoType selection dialog
This change adds a right-click context menu to the
AutoType dialog, which allows the user to copy
either the username or password. The dialog then
automatically closes.
2019-06-19 10:23:33 -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
PF93mc8y7erq92qTmTjJBysALa
9e06dc0d5c simplify wording of enabling browser integration 2019-06-18 21:38:29 -04:00
Soham Gumaste
9728df2a48 Add links to docs in the Help menu (#3274)
* Fix #3266 and Fix #3197 
* Add documentation links to Help menu
* Added offline documentation (PDF) for Getting Started Guide and User Guide
2019-06-18 20:46:46 -04:00
Balazs Gyurak
05c11d1b7c CLI: Add 'flatten' option to the 'ls' command (#3276)
* Fixes #925 
* Add 'flatten' option to CLI ls command
* Add test for Group::hierarchy() and man page for ls --flatten
* Rename group sort test to align with others
2019-06-18 20:42:19 -04:00
Jonathan White
1e915eef89 Run code formatter 2019-06-18 18:51:38 -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
louib
04360ed552 CLI Command cleanup
This PR cleans up the `Command` classes in the CLI, introducing a
`DatabaseCommand` class for the commands operating on a database,
and a `getCommandLineParser` command to centralize the arguments
parsing and validation.

The opening of the database based on the CLI arguments and options
is now centralized in `DatabaseCommand.execute`, making it easy to
add new database opening features (like YubiKey support for the CLI).

Also a couple of bugs fixed:
  * `Create` was still using `stdout` for some error messages.
  * `Diceware` and `Generate` were not validating that the word count was an integer.
  * `Diceware` was also using `stdout` for some error messages.
2019-06-14 18:15:38 -04:00
varjolintu
3cf171cbf5 Support returning a canceled message 2019-06-14 17:57:07 -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
Janek Bevendorff
38524507d5
Merge branch 'master' into develop 2019-06-12 01:10:25 +02:00
Jonathan White
72de3cf9ca Fix clicking tray icon to toggle window on Linux (#3258)
KDE does not take focus from the current active window when the tray
icon is clicked. This prevented toggling the window (always called bringToFront).
Checking if the window is active corrects this issue.

Fixes #3256, fixes #3214.
2019-06-12 00:25:17 +02:00
Jonathan White
6d449aca49 Fix remaining issues with menu keyboard navigation (#3248)
* Fix remaining issues with menu keyboard navigation
* Entry menu now locks focus on entry when used from menubar
* When using keyboard navigation to select menubar menus,
  do not lose focus on selected entry (fixes #3246)
* Enable all entry keyboard shortcuts while in search (fixes #3034)
* When the search text edit has focus, retain selected entry keyboard
  shortcuts and button pressing capability
2019-06-11 09:37:23 +02:00
Jonathan White
fbf8cb3d6f Fix issues with 2.4.2 deployment (#3247)
* Fix macOS proxy dependency on libsodium (fixes #3203)
* Fix missing library in snap release (fixes #3209)
2019-06-11 09:28:47 +02:00
Wolfram Rösler
293ef357fc Add system tray icon for "Toggle Window" (#3244)
* Fixes #3145
The system tray menu used to have three items (toggle window,
lock database, quit) of which only two had an icon, which
looked strange and unintended. This commit adds an icon for
the "Toggle window" menu item.

* Use a padlock icon for the "Lock DB" tray menu item

Originally, icon `document-encryt.png` was used, however theming seems
to be getting in the way by sometimes displaying a plain "document"
icon instead. Copied the icon files to `database-lock.png` and used
that one for the "lock database" tray menu item instead.

* In Database Settings, use the "security-high" icon for "Security"

Previously, the "document-encrypt" icon was used, which should be
something like a padlock but which, due to theming, somethings
fell back to a generic document icon (page of paper).

The "document-encrypt" icon is no longer used and was removed.
2019-06-09 21:22:19 -04:00
David Lareau
54eafc8ebe Settings option to shush success KeeShare notifications (#3236) 2019-06-07 08:43:25 -04:00
Jonathan White
16a11c3a7f
Merge branch 'master' into develop 2019-05-31 16:17:47 -04:00
Jonathan White
b90e9ee428 Fix behavior when saving after canceling entry edit
* Fixes #3141
* Clearing the entry edit widget prior to emitting the editFinished signal caused the widget to be marked modified and prevent new entries from being created. Use an explicit boolean to notify commit success.
* Don't clear password generator on canceling a cancel
* Don't discard changes if saving from a cancel produces an error
2019-05-31 08:22:38 -04:00
Jonathan White
c645e2e303 Set default Argon2 transform rounds to 10
* Fixes #2806
2019-05-31 08:22:38 -04:00
Jonathan White
a747886323 Exit when receiving OS Close Message when in tray
* Fixes #2692
* KeePassXC was ignoring OS close messages on shutdown or logoff when minimize to tray on close was enabled. This change causes a second close message (when KeePassXC is hidden to the tray) to actually exit the application.
2019-05-31 08:22:38 -04:00
Jonathan White
6f443ee9fc Fix argument parsing for OTP TOTP URL's
* Fixes #2915
2019-05-31 08:22:38 -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
91283e7c76 Prevent context menu options from disabling with keyboard navigation
* Fixes #2838
* When navigating the entry context menu with up/down arrow the options would disable due to losing focus on the EntryView. This change preserves the "focus" during this event.
2019-05-31 08:22:38 -04:00