Commit Graph

3361 Commits

Author SHA1 Message Date
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
TheAssassin
0c2d1bcc50 Embed version information in AppImage 2019-06-18 08:24:30 -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
DJCrashdummy
b4dab5d8b1 revised this resp. these two guides
* unified the 2 guides (Quickstart & KeeShare) a bit
* use "international" mozilla-link
* removed wrong and/or superfluous newlines & spaces
* some other minor polish & cleanup
2019-06-14 17:51:49 -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
Janek Bevendorff
5d6ef0c471
Release 2.4.3
- Fix library loading issues in the Snap and macOS releases [#3247]
- Fix various keyboard navigation issues [#3248]
- Fix main window toggling regression when clicking the tray icon on KDE [#3258]
- Add documentation for keyboard shortcuts to source code distribution [#3215]
2019-06-12 01:08:03 +02:00
Janek Bevendorff
9d7990b4a7
Update translations 2019-06-12 01:07:59 +02:00
Janek Bevendorff
1398b9f5fc
Bump version to 2.4.3, update CHANGELOG 2019-06-12 01:04:40 +02:00
Janek Bevendorff
ba02bad45b
Remove obsolete Dockerfiles 2019-06-12 00:53:56 +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
Balazs Gyurak
430aec93d3 Fix 'beginner issues' link to use correct label 2019-06-11 18:05:34 -04:00
Janek Bevendorff
5f42a0b3b9 Revert "Fix status icon URL"
This reverts commit c3a8ca62c9.
2019-06-11 15:16:25 +02:00
Janek Bevendorff
c3a8ca62c9
Fix status icon URL 2019-06-11 15:12:37 +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
Wolfram Rösler
b13454eeb4 Compile with Compiler Cache (ccache) if it's installed
Install with `sudo apt install ccache`.

Makes building a huge lot faster, especially when switching branches.
Nothing happens if ccache is not installed.

Example: (measured on my laptop)

```
$ ccache -C # clear the cache
$ rm -fr build
$ cd build
$ cmake -DWITH_XC_ALL=ON -DCMAKE_BUILD_TYPE=Release ..
$ time make -j4
...
real	5m8,817s
user	16m47,107s
sys	1m38,808s

$ rm -fr ../build/*
$ cmake -DWITH_XC_ALL=ON -DCMAKE_BUILD_TYPE=Release ..
$ time make -j4
...
real	0m32,571s
user	1m0,253s
sys	0m24,069s
```
2019-06-09 20:01:12 -04:00
David Lareau
54eafc8ebe Settings option to shush success KeeShare notifications (#3236) 2019-06-07 08:43:25 -04:00
Soham Gumaste
d5e544ab32 Add documentation for keyboard shortcuts (#3215)
* Add docs/KEYBINDS.md which lists all keyboard shortcuts.
* Added a reference in README.md to KEYBINDS.md
* Fixes #3175
2019-06-05 23:23:29 -04:00
Jonathan White
16a11c3a7f
Merge branch 'master' into develop 2019-05-31 16:17:47 -04:00
Jonathan White
a775031fe9
Release 2.4.2
- Improve resilience against memory attacks - overwrite memory before free [#3020]
- Prevent infinite save loop when location is unavailable [#3026]
- Attempt to fix quitting application when shutdown or logout issued [#3199]
- Support merging database custom data [#3002]
- Fix opening URL's with non-http schemes [#3153]
- Fix data loss due to not reading all database attachments if duplicates exist [#3180]
- Fix entry context menu disabling when using keyboard navigation [#3199]
- Fix behaviors when canceling an entry edit [#3199]
- Fix processing of tray icon click and doubleclick [#3112]
- Update group in preview widget when focused [#3199]
- Prefer DuckDuckGo service over direct icon download (increases resolution) [#2996]
- Remove apply button in application settings [#3019]
- Use winqtdeploy on Windows to correct deployment issues [#3025]
- Don't mark entry edit as modified when attribute selection changes [#3041]
- Use console code page CP_UTF8 on Windows if supported [#3050]
- Snap: Fix locking database with session lock [#3046]
- Snap: Fix theming across Linux distributions [#3057]
- Snap: Use SNAP_USER_COMMON and SNAP_USER_DATA directories [#3131]
- KeeShare: Automatically enable WITH_XC_KEESHARE_SECURE if quazip is found [#3088]
- macOS: Fix toolbar text when in dark mode [#2998]
- macOS: Lock database on switching user [#3097]
- macOS: Fix global Auto-Type when the database is locked [#3138]
- Browser: Close popups when database is locked [#3093]
- Browser: Add tests [#3016]
- Browser: Don't create default group if custom group is enabled [#3127]
2019-05-31 16:03:47 -04:00
Jonathan White
3bc78f9946
Update translations 2019-05-31 16:03:35 -04:00
Jonathan White
9a3481e900
2.4.2 Changelog 2019-05-31 16:01:54 -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
Jonathan White
63aab99b9c
Merge branch 'release/2.4.2' into develop 2019-05-30 17:22:09 -04:00
Jonathan White
3d5879b8ed Use Snap-Specific directories
* Fix native messaging to use user-specific common folder
* Open attachments in snap data folder
2019-05-30 15:32:26 -04:00
varjolintu
5341a8215c Browser Integration tests 2019-05-29 09:24:22 -04:00
Jonathan White
6d5c6c7d17 Read all database attachments even if duplicated
* Fixes #3048
* Certain programs that read/write KDBX4 files do not consolidate duplicate attachments into a single binary. This is against the KDBX4 specification. This change ensures KeePassXC will at least read the database in its entirety and not lose information. Upon saving the database in KeePassXC, the duplicate attachment binaries will be reduced to single binaries per the specification.
2019-05-25 15:48:19 -04:00
shaneknysh
7ead8e7290 Add word case option to passphrase generator (#3172)
* Closes #1933
* Adds word case options for lower, UPPER, and Title Case to passphrase generation
2019-05-24 18:23:19 -04:00
Jonathan White
2ee97ed191 Code formatting 2019-05-19 18:21:34 -04:00
Jonathan White
96438a45b4 Various minor code improvements 2019-05-19 18:21:34 -04:00