Compare commits

...

450 Commits
2.1.4 ... 2.2.0

Author SHA1 Message Date
Jonathan White
caa49a8ef3 Release 2.2.0
- Added YubiKey 2FA integration for unlocking databases [#127]
- Added TOTP support [#519]
- Added CSV import tool [#146, #490]
- Added KeePassXC CLI tool [#254]
- Added diceware password generator [#373]
- Added support for entry references [#370, #378]
- Added support for Twofish encryption [#167]
- Enabled DEP and ASLR for in-memory protection [#371]
- Enabled single instance mode [#510]
- Enabled portable mode [#645]
- Enabled database lock on screensaver and session lock [#545]
- Redesigned welcome screen with common features and recent databases [#292]
- Multiple updates to search behavior [#168, #213, #374, #471, #603, #654]
- Added auto-type fields {CLEARFIELD}, {SPACE}, {{}, {}} [#267, #427, #480]
- Fixed auto-type errors on Linux [#550]
- Prompt user prior to executing a cmd:// URL [#235]
- Entry attributes can be protected (hidden) [#220]
- Added extended ascii to password generator [#538]
- Added new database icon to toolbar [#289]
- Added context menu entry to empty recycle bin in databases [#520]
- Added "apply" button to entry and group edit windows [#624]
- Added macOS tray icon and enabled minimize on close [#583]
- Fixed issues with unclean shutdowns [#170, #580]
- Changed keyboard shortcut to create new database to CTRL+SHIFT+N [#515]
- Compare window title to entry URLs [#556]
- Implemented inline error messages [#162]
- Ignore group expansion and other minor changes when making database "dirty" [#464]
- Updated license and copyright information on souce files [#632]
- Added contributors list to about dialog [#629]
2017-06-25 17:52:43 -04:00
Jonathan White
9a6a787191 Update translations 2017-06-25 17:52:35 -04:00
Jonathan White
836c996544 Cleanup before release
* Cleanup cpack commands
* Add default config for portable install
* Force translation downloads
* Reduce translation download threshold to 40%
2017-06-25 17:50:47 -04:00
Jonathan White
b8028ff318 Updated snapcraft file to compile on Ubuntu 17.04 2017-06-24 11:24:41 -04:00
Jonathan White
9a7e6850d6 Merge remote-tracking branch 'origin/develop' into release/2.2.0 2017-06-23 14:21:30 -04:00
louib
fdbed324f7 Outputing newline after password prompt. (#659) 2017-06-22 16:25:24 -04:00
louib
95baf25648 failure when showing help (#658) 2017-06-21 19:09:44 -04:00
louib
48ea024d7e Adding support for listing a group. (#652)
* Adding support for listing a group.

* added findGroupByPath

* Removing useless asserts.

* Code review.
2017-06-21 17:34:49 -04:00
Jonathan White
6dfeea1980 Merge remote-tracking branch 'origin/develop' into release/2.2.0 2017-06-21 17:20:57 -04:00
Jonathan White
9d6cf95cf0 Merge pull request #629 from keepassxreboot/feature/contributors
Added contributors to about dialog
2017-06-21 17:20:19 -04:00
Jonathan White
97c8603478 Removed font size on text labels in about dialog 2017-06-21 17:09:00 -04:00
Jonathan White
7654983d3d Added contributors to about dialog; general cleanup 2017-06-21 17:08:54 -04:00
Weslly
3c2b4b1560 Merge pull request #654 from weslly/feature/search-scope-option
Add option to limit search to current group
2017-06-21 16:35:53 -03:00
Janek Bevendorff
cb63df2bac Merge pull request #656 from weslly/feature/disable-stdin-echo
Disable stdin echo when entering passwords on cli
2017-06-21 17:26:37 +02:00
Weslly
400073c7cc Disable stdin echo when entering passwords on cli 2017-06-21 11:15:59 -03: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
Jonathan White
a3020b6787 Bumped version to 2.2.0 and populated CHANGELOG 2017-06-20 23:14:44 -04:00
Jonathan White
702a68307a Allow multiple instances when debugging (#651) 2017-06-20 16:17:35 -04:00
louib
344235b1e1 Fix CLI help and version options. (#650)
* Correct handling of --help and --version

* Moving arguments building up.

* Only manipulating argv is the command is valid.

* Not a failure when --help

* Not using showVersion()
2017-06-19 11:09:19 -04:00
Jonathan White
8d70167acf Add support for portable config settings (#645)
* Add support for portable config settings

* Use applicationDirPath instead of currentPath
2017-06-19 10:49:02 -04:00
louib
b75b9fb7d6 Adding gui prompt to List command. (#643) 2017-06-18 14:43:02 -04:00
Janek Bevendorff
f817eaa5c8 Merge pull request #644 from louib/adding_save_database_file
Adding saveToFile function to Database.
2017-06-15 23:11:24 +02:00
Louis-Bertrand Varin
574c5cf1b2 clang-format Database.cpp 2017-06-15 10:31:14 -04:00
Louis-Bertrand Varin
e0e8521eb9 Removing m_writer from CsvImportWidget.h 2017-06-15 10:26:37 -04:00
Louis-Bertrand Varin
46f7d97176 Using saveToFile in Merge command. 2017-06-14 20:00:09 -04:00
Louis-Bertrand Varin
f3f6f6a493 Adding saveToFile function. 2017-06-14 19:50:19 -04:00
TheZ3ro
139658b5c3 Merge pull request #632 from keepassxreboot/fix/copyrightNotice
Update and fix copyright headers
2017-06-14 19:15:53 +02:00
thez3ro
11607b108c fix base32 copyright 2017-06-14 15:54:43 +02:00
thez3ro
62748f6d4c Add missing icon to COPYING 2017-06-14 15:54:43 +02:00
thez3ro
a53b111182 Update and fix copyright headers 2017-06-14 15:54:43 +02:00
Jonathan White
6ffca842e6 Add "Apply" button to entry and group edit windows (#624) 2017-06-13 20:55:53 -04:00
Weslly
107684e393 Merge pull request #634 from weslly/fix/macos-dialog-localizations
Fix macOS file dialog localization
2017-06-11 17:32:42 -03:00
Weslly
08930ddffb Fix macOS file dialog localization 2017-06-10 10:50:53 -03:00
Jonathan White
458c76d3b7 Update release tool and snapcraft.yaml (#610)
* Release tool checks snapcraft file for version and added removable-media plug

* Added 'check' command to release tool. Code cleanup.
2017-06-06 10:35:15 -04:00
TheZ3ro
1847312c7a Merge pull request #622 from keepassxreboot/fix/passgen-buttons
Fix password generator button's enable behavior
2017-06-05 23:38:02 +02:00
thez3ro
3015baf6e6 fix password generator button's enable behavior 2017-06-04 21:06:27 +02:00
TheZ3ro
3c51455fa3 Merge pull request #606 from hifi/add-copy-to-pwgen
Add copy button to password generator (#595)
2017-06-04 20:44:04 +02:00
TheZ3ro
1028172dfc Merge branch 'develop' into add-copy-to-pwgen 2017-06-04 20:33:56 +02:00
Yen Chi Hsuan
2b6059dee3 🐛 Fix building with Qt 5.9 (closes #528) 2017-06-01 17:05:07 -04:00
Janek Bevendorff
79ba3a28e6 Merge pull request #603 from hifi/fix-search-leak
🔒 Fix search information leak
2017-05-29 00:19:25 +02:00
Toni Spets
398201f592 Add copy button to password generator (#595) 2017-05-28 20:47:33 +03:00
Toni Spets
6f4b5fc71a 🔒 Fix search information leak 2017-05-28 18:08:38 +03:00
TheZ3ro
9fc83c7cd5 Merge pull request #602 from hifi/fix-bugs-link
Fix about dialog report bugs link functionality
2017-05-28 10:21:57 +02:00
TheZ3ro
e6cddf797a Merge branch 'develop' into fix-bugs-link 2017-05-28 10:12:55 +02:00
TheZ3ro
8a1b83048f Merge pull request #601 from keepassxreboot/hotfix/compile-error
Fixed variable naming error that prevented compiling on Windows
2017-05-28 09:31:03 +02:00
Toni Spets
ac5c0c5efa Fix about dialog report bugs link functionality 2017-05-28 08:11:02 +03:00
Jonathan White
bfee734669 Fixed variable naming error that prevented compiling on Windows 2017-05-27 21:33:30 -04:00
TheZ3ro
22d533c451 Merge pull request #510 from antongulenko/single-instance
Single instance
2017-05-27 13:06:23 +02:00
TheZ3ro
adf61d9878 Merge branch 'develop' into single-instance 2017-05-27 09:18:13 +02:00
louib
dcc8094ce4 Add the GUI prompt option to the merge command. (#589) 2017-05-25 13:07:24 -04:00
louib
c3bd5d21aa Adding a GUI prompt for password. (#587) 2017-05-22 17:53:41 -04:00
Janek Bevendorff
a75746c7c1 Merge pull request #588 from louib/find_by_name
Find entry by title.
2017-05-21 21:26:55 +02:00
Louis-Bertrand Varin
eeafe77614 Find entry by title. 2017-05-21 13:51:16 -04:00
louib
54ad927044 Moving print group in Group class. (#586) 2017-05-21 13:05:44 -04:00
louib
a2e82dc883 Feature : clip command (#578) 2017-05-19 14:04:11 -04:00
Janek Bevendorff
6c050c55d9 Merge pull request #583 from keepassxreboot/feature/macos-minimize-onclose
Add trayicon on macOS and enable minimize onClose
2017-05-19 18:51:17 +02:00
Janek Bevendorff
379e17c3bc Merge branch 'develop' into feature/macos-minimize-onclose 2017-05-19 18:08:40 +02:00
thez3ro
c0640e49ee revert old if structure 2017-05-19 14:30:09 +02:00
TheZ3ro
07d4668670 Merge pull request #582 from weslly/feature/macos-minimize-onclose
Fix quit submenu on macOS tray icon
2017-05-19 14:19:11 +02:00
Weslly
1c54d24962 Fix quit submenu on macOS tray icon 2017-05-19 00:50:24 -03:00
Janek Bevendorff
aa64b2ee69 Merge pull request #580 from keepassxreboot/feature/430-fix-unclean-shutdown
Feature/430 fix unclean shutdown
2017-05-17 23:18:46 +02:00
Janek Bevendorff
00dc4b9ace Ignore double close event on macOS, resolves #430 2017-05-17 22:44:09 +02:00
Janek Bevendorff
c69a978589 Merge pull request #545 from keepassxreboot/feature/lock-db-on-session-lock-#134
Lock database on ScreenSaver/SessionLock
2017-05-17 22:43:39 +02:00
thez3ro
b69b50c6c6 fix codestyle and use C++11 keywords 2017-05-17 13:04:02 +02:00
Louis-Bertrand Varin
970525cfd4 Styling + CFNotificationName -> CFStringRef 2017-05-17 13:04:02 +02:00
thez3ro
533136fb0e Add file header, use nullptr instead of NULL, fix code style 2017-05-17 13:04:02 +02:00
Jonathan White
3218cb9ace Moved locking checkboxes into security settings 2017-05-17 13:04:02 +02:00
Jonathan White
147c000ef1 Corrected nullptr crash on Windows when going to sleep 2017-05-17 13:04:02 +02:00
thez3ro
8ddd0b2f6f Revert travis settings 2017-05-17 13:04:02 +02:00
thez3ro
1b7b2ff456 Added freedesktop DBus, fixed codestyle 2017-05-17 13:04:02 +02:00
Claudio Bantaloukas
289e98ed5b remove commented code 2017-05-17 13:04:02 +02:00
Claudio Bantaloukas
d1acd75068 Moved "Lock databases on screen lock" setting to security settings
widget.
Changed wording and preference variable name for conformity with
existing settings.
2017-05-17 13:04:02 +02:00
Claudio Bantaloukas
44085df592 Avoid warning in MacOS implementation 2017-05-17 13:04:02 +02:00
Claudio Bantaloukas
a3af8fc0ea Fix Linux ScreenLockListener implementation 2017-05-17 13:04:02 +02:00
Claudio Bantaloukas
c6ecf48ccd enable OS X build with Xcode 8.2 2017-05-17 13:04:02 +02:00
Claudio Bantaloukas
2de5a9d281 Lock database when OS is locked (Windows, DBus, macOS implementations) #134 2017-05-17 13:04:02 +02:00
Janek Bevendorff
a6bc3e9790 Merge pull request #571 from yan12125/feature/allow-disable-app-bundle
Allow disabling .app bundles on Mac
2017-05-14 20:02:19 +02:00
Yen Chi Hsuan
c53f5baceb Merge branch 'develop' into feature/allow-disable-app-bundle 2017-05-14 22:58:17 +08:00
Yen Chi Hsuan
3822625e77 Allow disabling .app bundles on Mac 2017-05-14 22:51:12 +08:00
Louis-Bertrand Varin
00ae123736 Adding .clang-format file. 2017-05-14 09:20:13 -04:00
Robert van Bregt
c167693ae4 add fix for mac qt build environment
Signed-off-by: Robert van Bregt <robert@robertvanbregt.nl>
2017-05-14 09:19:35 -04:00
Jens Rutschmann
9a59a124aa Compare window title with entry URLs during autotype matching. (#556)
* Compare window title with entry URLs during autotype matching.

* Adapted option label to reflect that both entry title and URL are used for auto-type window matching.
2017-05-13 19:02:54 -04:00
TheZ3ro
03f00c5526 Merge pull request #566 from metbril/patch-1
Update README.md
2017-05-12 18:43:49 +02:00
TheZ3ro
bdb6153b3e Merge pull request #562 from keepassxreboot/feature/unlocked-tray-icon
Use a dedicated tray icon when the database is unlocked.
2017-05-12 18:42:48 +02:00
Robert
70357be029 Update README.md
changed reference to new build instructions
2017-05-12 10:54:01 +02:00
thez3ro
8d6db27b34 add tray icon to MacOS X 2017-05-11 13:44:08 +02:00
Jan Hellwig
c06e55df81 Use a dedicated tray icon when the database is unlocked. 2017-05-11 12:27:40 +02:00
Anton Gulenko
58463bc3dc Fixed string literals 2017-05-09 14:13:25 +02:00
VukoDrakkeinen
d1310b3337 Raise existing instance
Closes #193
2017-05-09 14:06:45 +02:00
thez3ro
b3160a17ea enable minimize on close for macOS 2017-05-08 23:27:54 +02:00
Janek Bevendorff
9f819061cd Merge pull request #550 from keepassxreboot/bugfix/autotype-delay
Added small delays to autotype on Linux
2017-05-07 11:36:51 +02:00
Jonathan White
e4e2e886e8 Added small delays to autotype on Linux 2017-05-06 23:31:28 -04:00
Janek Bevendorff
278baaac80 Merge pull request #549 from keepassxreboot/hotfix/cmake_updates
Cleanup CMake files
2017-05-07 00:56:41 +02:00
Jonathan White
5c8809e55d Update cmake files, fixes #331 2017-05-06 11:51:43 -04:00
Jonathan White
af4f56abfd Support vscode 2017-05-05 20:20:27 -04:00
TheZ3ro
1870b957f5 Merge pull request #519 from weslly/feature/totp
Add TOTP support
2017-05-04 11:15:05 +02:00
Weslly
3640053415 Parse TOTP input string before first save 2017-05-03 22:00:58 -03:00
Weslly
d3ed14ebb7 Display TOTP code split in halfs 2017-05-03 21:26:08 -03:00
Weslly
4c9b8c7794 Review fixes 2017-05-03 21:04:12 -03:00
Weslly
bf57a28654 Add TOTP support 2017-05-03 20:55:14 -03:00
TheZ3ro
7040bef27e Merge pull request #538 from keepassxreboot/feature/extendedAscii
Add support for extended ASCII in password generator
2017-05-01 18:13:09 +02:00
thez3ro
40b4dc3b61 Only printable extended ASCII 2017-05-01 01:18:42 +02:00
thez3ro
b474d34cf0 Add Extended ASCII to password generator 2017-04-28 21:36:43 +02:00
Louis-Bertrand Varin
fa7c945363 Adding EASCII character class. 2017-04-28 19:01:02 +02:00
TheZ3ro
c40a7a5265 Merge pull request #536 from weslly/hotfix/elcapitan
Fix compile issue on OSX El Capitan
2017-04-28 16:43:36 +02:00
Weslly
a94efddfe6 Fix compile issue on OSX El Capitan 2017-04-28 11:03:15 -03:00
TheZ3ro
99d97acb1d Merge pull request #490 from seatedscribe/feature/csv-field-names
[CSV import window] add option to choose dropdown menu field names from CSV
2017-04-28 14:48:53 +02:00
seatedscribe
eb7f4d2eaa Apply requested changes 2017-04-27 22:11:26 +02:00
seatedscribe
2e2e37098f [CSV import GUI] add option to choose dropdown menu field names from CSV
This should also close #458
2017-04-27 21:21:21 +02:00
louib
ad79162061 Merge pull request #520 from vsvyatski/develop
Add context menu entry to clean the Recycle Bin in databases
2017-04-22 19:14:45 -04:00
Vladimir Svyatski
c613f44991 Finish test cases for emptying recycle bin 2017-04-23 00:50:26 +03:00
Vladimir Svyatski
583f60a3f3 Add recycle bin test cases body 2017-04-22 19:25:52 +03:00
Vladimir Svyatski
5792bf1a85 Add skeleton for TestDatabase.cpp and test data for unit tests for the "empty recycle bin" functionality 2017-04-22 12:38:36 +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
TheZ3ro
b01953a5a3 Merge pull request #515 from yan12125/fix-new-database-shortcut
🐛 Really set the shortcut for "New database" to Ctrl+Shift+N
2017-04-21 10:47:02 +02:00
TheZ3ro
47aec87a56 Merge branch 'develop' into fix-new-database-shortcut 2017-04-21 10:40:07 +02:00
Yen Chi Hsuan
b706e8f1fd 🐛 Really set the shortcut for "New database" to Ctrl+Shift+N
Ref: #316
Fixes #513
2017-04-21 12:59:20 +08:00
Jonathan White
1f469a7acc Merge pull request #464 from louib/feature/ignoreGroupExpansion
Ignore group expansion and other minor changes when marking database as dirty
2017-04-20 21:09:56 -04:00
Louis-Bertrand Varin
07050f6e9c Generalizing option to non-data changes. 2017-04-20 19:24:43 -04:00
louib
ab3e009d76 Merge pull request #517 from weslly/fix-compile
Fix OSX El Capitan compilation issue
2017-04-20 19:12:20 -04:00
Weslly
5fbf4af596 Fix OSX El Capitan compilation issue 2017-04-20 17:53:12 -03:00
louib
943c3155af Merge pull request #514 from vsvyatski/develop
Add a scrollbar in the AddEntry window when on "small" screen
2017-04-20 11:17:58 -04:00
Vladimir Svyatski
9477437256 🐛 Fix for the issue #108: Add a scrollbar in the AddEntry window when on "small" screen 2017-04-20 16:56:54 +03:00
Vladimir Svyatski
c7b4b8d3c3 Merge remote-tracking branch 'upstream/develop' into develop 2017-04-19 08:32:13 +03:00
Vladimir Svyatski
52a264cc2b Moved the "Clear history" menu item caption from MainWindow (Database > Recent Databases > Clear history) to the string resources. As a result it is no longer hardcoded and can be translated. 2017-04-18 21:52:16 -04:00
Vladimir Svyatski
dc3e223875 Moved the "Clear history" menu item caption from MainWindow (Database > Recent Databases > Clear history) to the string resources. As a result it is no longer hardcoded and can be translated. 2017-04-18 16:04:32 +03:00
Mike Kasberg
70bd598ead Fix #447 - Menu Accelerators for Database & Tools 2017-04-16 19:33:53 -04:00
TheZ3ro
f03aec1709 Merge pull request #502 from weslly/patch-2
Set fixed size for entry clone dialog
2017-04-14 14:13:55 +02:00
Weslly
3c85d29ece Set fixed size for entry clone dialog 2017-04-14 09:02:22 -03:00
TheZ3ro
2099f977fb Merge pull request #501 from weslly/patch-1
Remove maximum size from label in clone dialog
2017-04-14 12:17:55 +02:00
Weslly
6f25c4750d Remove maximum size from label in clone dialog 2017-04-14 07:09:20 -03:00
TheZ3ro
4e40b6cf3e Merge pull request #500 from weslly/hotfix/clone-dialog-layout
Fix clone dialog layout
2017-04-14 10:50:36 +02:00
Weslly
7620baee80 Fix clone dialog layout 2017-04-13 22:43:51 -03:00
Janek Bevendorff
4c491d850d Merge pull request #495 from keepassxreboot/hotfix/snapcraft
Add autotype plugin to snapcraft build
2017-04-12 03:30:43 +02:00
Jonathan White
e2c088a5c9 Add autotype plugin to snapcraft build 2017-04-11 19:13:02 -04:00
Janek Bevendorff
82b3013b0f Merge pull request #487 from seatedscribe/feature/cmake-deprecated
Substitute deprecated commands with feature_summary
2017-04-11 16:27:58 +02:00
seatedscribe
73b0188126 Substitute deprecated commands with feature_summary 2017-04-10 22:05:53 +02:00
Janek Bevendorff
82abdeb15f Merge pull request #485 from keepassxreboot/hotfix/nodep-on-debug
Disable DEP and ASLR for Debug builds
2017-04-10 01:15:36 +02:00
Jonathan White
4cd461f57a Disable DEP and ASLR for Debug builds. This allows for debugging with GDB. 2017-04-09 18:52:54 -04:00
Jonathan White
5696178de4 Merge pull request #373 from keepassxreboot/feature/new-password-generator
New Diceware passphrase generator
2017-04-09 12:36:56 -04:00
Typz
5f5f7ec3dd Reference Safari extension to support KeepassHTTP 2017-04-09 12:06:45 -04:00
Louis-Bertrand Varin
c9498868e9 Removing pledge campaign. 2017-04-09 11:59:50 -04:00
Louis-Bertrand Varin
f95e33cf7b Updating readme with logo 2017-04-09 11:59:50 -04:00
Jonathan White
c0f62e5633 Merge pull request #427 from weslly/feature/autotype-clearfield
Add auto-type {CLEARFIELD}
2017-04-09 11:56:40 -04:00
Jonathan White
3de4395d5e Merge remote-tracking branch 'origin/master' into develop 2017-04-09 10:28:15 -04:00
Janek Bevendorff
047fe9a422 Merge pull request #483 from weslly/fix/menu-roles
Set menu roles for application menu on macOS
2017-04-09 14:29:06 +02:00
Weslly
8a78616351 Set menu roles for application menu on macOS 2017-04-09 07:44:17 -03:00
Weslly
89382f6306 Implement support for auto-type {{} and {}} 2017-04-08 23:29:32 -04:00
Louis-Bertrand Varin
beba23ea2e Prioritize explicit databases. 2017-04-08 17:46:06 -04:00
Weslly
0aa20f931d Change windows clearfield key sequence to avoid keyboard layout errors 2017-04-08 02:13:51 -03:00
Weslly
eefea5444e Change auto-type sequence on mac to support other keyboard layouts 2017-04-08 02:13:51 -03:00
thez3ro
a6e142dd02 support different keyboard layout 2017-04-08 02:13:51 -03:00
Weslly
6c1f023768 More accurate hotkey sequence 2017-04-08 02:13:51 -03:00
thez3ro
ea1ffe7fb5 use QT key instead of native ones 2017-04-08 02:13:51 -03:00
Weslly
36250f5180 Use AutoTypePlatformWin::sendKey instead of creating a new function 2017-04-08 02:13:51 -03:00
Weslly
268f09160d Add command modifier support for AutoTypePlatformMac::sendKey 2017-04-08 02:13:51 -03:00
thez3ro
7620395f92 Add auto-type {CLEARFIELD} on XCB 2017-04-08 02:13:51 -03:00
Weslly
28678f4e06 Add auto-type {CLEARFIELD} on Windows 2017-04-08 02:13:51 -03:00
Weslly
720ae949aa Rename ClearField keypress helper function 2017-04-08 02:13:51 -03:00
Weslly
32fe0493c4 Add auto-type {CLEARFIELD} on mac 2017-04-08 02:13:51 -03:00
Francois Ferrand
86e88c18b0 More compact search widget
* Move the search icon (with popup menu) and clear icon inside the
line edit
* Move the search widget to the right-side of toolbar
2017-04-06 07:19:56 -04:00
Louis-Bertrand Varin
a8b647e886 Typo in label for ignoreGroup. 2017-04-04 10:23:48 -04:00
Louis-Bertrand Varin
bce747e7f9 Ignore group expansion. 2017-04-04 10:21:45 -04:00
Weslly
b7546b45b3 Fix compiler warnings 2017-03-29 17:28:19 -04:00
thez3ro
f183260ad6 make stackedWidget index using enum 2017-03-29 17:27:14 -04:00
louib
0f057a8351 Merge pull request #437 from keepassxreboot/fix/recentDatabases
Fix RecentDatabases
2017-03-29 15:10:09 -04:00
thez3ro
7ca13b3d51 fix RecentDatabases, closes #386 2017-03-29 17:09:33 +02:00
Jonathan White
1418712b4c Added xvfb to Dockerfile 2017-03-26 23:25:17 -04:00
Janek Bevendorff
e5021ffa01 Merge pull request #436 from keepassxreboot/hofix/dockerfile
Updated Dockerfile to meet new library requirements
2017-03-26 16:07:55 +02:00
Jonathan White
572212c374 Updated Dockerfile to meet new library requirements 2017-03-26 09:55:06 -04:00
TheZ3ro
e0c6981b40 Merge pull request #417 from seatedscribe/feature/csv-import-button
Adds a button for CSV import option
2017-03-25 21:26:30 +01:00
TheZ3ro
0d60cadffc Merge branch 'develop' into feature/csv-import-button 2017-03-25 21:04:09 +01:00
TheZ3ro
26bc2a8c3e Merge pull request #425 from hifi/empty-bools
Treat empty booleans in XML as false
2017-03-23 11:06:48 +01:00
Toni Spets
07dafd697e Treat empty booleans in XML as false 2017-03-23 06:58:44 +02:00
seatedscribe
e48f86b289 Horizontal layout for import buttons 2017-03-22 22:34:29 +01:00
seatedscribe
e5c2b44572 Commit review request 2017-03-22 22:33:00 +01:00
seatedscribe
9307834ef0 Add a button for CSV import option 2017-03-22 22:33:00 +01:00
Janek Bevendorff
99036ec151 Merge pull request #422 from weslly/feature/osx-proxy-icon
Add proxy icon to title bar in OSX
2017-03-22 12:05:53 +01:00
Weslly
5776f43b98 Add proxy icon to title bar in OSX 2017-03-21 23:01:44 -03:00
thez3ro
0c755846fe fix camel case 2017-03-22 00:04:36 +01:00
thez3ro
19d1fa8e7d change button position 2017-03-22 00:00:23 +01:00
thez3ro
8937647d5f let every string as separator 2017-03-22 00:00:23 +01:00
thez3ro
7541f57aeb some UI fix 2017-03-22 00:00:23 +01:00
thez3ro
b6a7771a23 hide comboBoxWordList if only one worlist present 2017-03-22 00:00:23 +01:00
thez3ro
1d32695f10 permit only wordcount > 0 2017-03-22 00:00:23 +01:00
thez3ro
044feea23a remove short wordlists 2017-03-22 00:00:23 +01:00
thez3ro
0ba19cce4d fix wordlist file install 2017-03-22 00:00:23 +01:00
thez3ro
67c6e10f5f add underscore as separator 2017-03-22 00:00:23 +01:00
thez3ro
98e2c311c3 fix wordCount instead of length 2017-03-22 00:00:23 +01:00
thez3ro
be9bd16b4c Add diceware tests 2017-03-22 00:00:23 +01:00
thez3ro
d9ccde94c9 New Diceware passphrase generator, close #21 2017-03-22 00:00:23 +01:00
Janek Bevendorff
93dcf8231f Merge pull request #420 from weslly/feature/window-modified-indicator
Set window modified indicator when database has unsaved changes
2017-03-21 14:27:43 +01:00
Weslly
b6cfc82b4e Review fixes 2017-03-21 06:04:26 -03:00
Weslly
d50fe46f0e Merge branch 'develop' into feature/window-modified-indicator 2017-03-21 00:11:19 -03:00
Weslly
18b5b76a80 Get modified status directly from database object instead of using window title 2017-03-20 23:29:36 -03:00
Weslly
a87fab8d18 Set window modified indicator when database has unsaved changes 2017-03-20 21:11:17 -03:00
Janek Bevendorff
7608405a1f Merge pull request #391 from louib/fix/checkPermissions
Adding warning messages when config access error.
2017-03-19 23:36:19 +01:00
Louis-Bertrand Varin
d8ad360b38 Using format strings. 2017-03-19 16:05:52 -04:00
Louis-Bertrand Varin
a3840963e1 Checking config access errors in settings. 2017-03-18 14:00:31 -04:00
Louis-Bertrand Varin
e6b4528028 Adjust indentation. 2017-03-18 13:31:15 -04:00
Louis-Bertrand Varin
55a32c58a9 Moving access error to MainWindow. 2017-03-18 13:19:57 -04:00
Louis-Bertrand Varin
da85252347 Hide config errors by default. 2017-03-18 13:19:57 -04:00
Louis-Bertrand Varin
15a288aa5b Adding warning messages when config access error. 2017-03-18 13:19:57 -04:00
Janek Bevendorff
c4d6fa855c Force event processing after adding entries to prevent test failure 2017-03-17 07:49:19 -04:00
Janek Bevendorff
80fc1e5309 Merge pull request #146 from seatedscribe/feature/import-csv-format
Implement import of databases in CSV (Comma Separated Values) format
2017-03-17 00:09:45 +01:00
seatedscribe
506a2b99c5 Revert dialog index back to zero 2017-03-16 22:55:26 +01: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
Florin Andrei
7e515d9d5b Update README.md
typo
2017-03-16 21:21:11 +01:00
Janek Bevendorff
a045594b57 Merge pull request #405 from keepassxreboot/fix/copyURL
Fix regex for placeholders and add regression test
2017-03-16 21:12:13 +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
TheZ3ro
4cccf28b4d Merge pull request #254 from keepassxreboot/feature/keepassxc-cli
KeePassXC CLI
2017-03-16 19:01:23 +01:00
thez3ro
558c75a452 Add ASAN to keepassxc-cli 2017-03-16 18:41:12 +01:00
Louis-Bertrand Varin
a661c17eca Adding group uuid to list. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
fd9d372e6a Adding second prompt for merge. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
cf23343911 Using openDatabaseFile in List. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
780e23301b Using openDatabaseFile in Merge. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
993f90cb2c Extracting openDatabaseFile. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
db1bf88934 Handling entry not found. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
15c2727a1d Adding the show command. 2017-03-16 10:09:50 -04:00
thez3ro
e01e9715b9 text for inserting password 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
98911af396 Fixed indentation. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
f579345059 Change cli commands description. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
64dfada038 Adding available commands. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
7ca475f968 Add list to keepassxc-cli 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
7636a559f9 Remove unused imports. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
b85941531d Keepass -> KeePass. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
782d1f17d1 Using ++argv 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
e1e8f33f67 Install path on Mac. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
805600ad44 Installing keepassxc-cli executable. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
342d49d050 Missing zxcvbn dependency. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
992d8a90c7 Migrate entropy-meter to keepassxc-cli 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
9b92e7f8e8 Use EXIT_FAILURE/SUCCESS 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
bf9b23539e Add dependency + adjust styling. 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
9cfc862b07 Disable core dumps (keepassxc-cli). 2017-03-16 10:09:50 -04:00
Louis-Bertrand Varin
52991f3d66 Add first keepassxc-cli version. 2017-03-16 10:09:50 -04:00
Janek Bevendorff
37441e3fac Merge pull request #394 from keepassxreboot/feature/asan
Add CMake option to enable address sanitizer checks
2017-03-16 00:41:15 +01:00
Janek Bevendorff
8b04040d7e Add WITH_ASAN option to README 2017-03-16 00:20:38 +01:00
Janek Bevendorff
9608464ed1 Show error message when trying to use WITH_ASAN on Windows or OS X 2017-03-15 15:23:55 +01:00
Janek Bevendorff
2587bac300 Enable ASAN option in Travis build 2017-03-15 15:23:52 +01:00
Janek Bevendorff
504bd40263 Prevent massive end-of-process leak sanitizer dump 2017-03-15 15:23:50 +01:00
Janek Bevendorff
28ec015ef4 Add -DWITH_ASAN=ON requirement to pull request template 2017-03-15 15:23:47 +01:00
Janek Bevendorff
65d4a0a8cd Add ASAN option to CMake 2017-03-15 15:23:44 +01:00
Janek Bevendorff
30847570bc Merge pull request #395 from stmllr/patch-1
Update feature description and build instructions for Yubikey
2017-03-15 15:23:20 +01:00
Steffen Müller
51b7ec2b26 List all cmake build options 2017-03-15 15:04:43 +01:00
Steffen Müller
f12c6bf748 Update feature and build instructions for Yubikey 2017-03-14 14:55:25 +01:00
louib
1b10aae74c Updating README.md (#390)
* Adding Yubikey 2FA to feature list
* Added project url
2017-03-10 21:25:56 -05:00
Janek Bevendorff
3e84c0a91a Merge pull request #127 from keepassxreboot/feature/yubikey
Add Yubikey 2FA for unlocking databases
2017-03-10 22:48:00 +01:00
Janek Bevendorff
2ff57c2eb7 Coding style fixes 2017-03-10 20:42:59 +01:00
Janek Bevendorff
bb04144fe8 Merge branch 'develop' into feature/yubikey 2017-03-10 18:53:38 +01:00
Janek Bevendorff
2f2f3e26c3 Merge pull request #389 from keepassxreboot/feature/fix-old-gcc
Enable -fstack-protector-strong flag only for GCC >= 4.9 and Clang
2017-03-10 18:53:09 +01:00
Janek Bevendorff
34f037be92 Enable -fstack-protector-strong flag only for GCC >= 4.9 and Clang 2017-03-10 18:42:10 +01:00
Janek Bevendorff
429bef6830 Remove unused debug function 2017-03-10 18:06:22 +01:00
Janek Bevendorff
15dd783d2c Merge branch 'develop' into feature/yubikey 2017-03-10 18:01:14 +01:00
Janek Bevendorff
7851d3d987 Merge pull request #371 from rockihack/DEP+ASLR
Enable DEP and ASLR.
2017-03-10 17:50:58 +01:00
Janek Bevendorff
8a942422da Harden Linux binary 2017-03-10 17:46:15 +01:00
rockihack
914b848e58 Enable DEP+ASLR for cmake modules (autotype dll). 2017-03-10 17:46:12 +01:00
rockihack
1984595d0d Enable DEP and ASLR. 2017-03-10 17:46:08 +01:00
Janek Bevendorff
a58f84a1ff Merge pull request #387 from keepassxreboot/feature/clean-code
Clean up code, replace Q_* macros with MOC keywords
2017-03-10 17:45:15 +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
4c0e2af6e3 Remove UTF-8 BOM 2017-03-10 16:12:00 +01:00
Janek Bevendorff
cb51ec61f7 Replace remaining instances of Q_FOREACH with C++11 range-based for loops 2017-03-10 16:11:57 +01:00
Janek Bevendorff
2872f1706c Fix Qt deprecation warnings 2017-03-10 16:11:55 +01:00
Janek Bevendorff
da0afd3939 Fix compiler warnings 2017-03-10 16:11:52 +01:00
seatedscribe
984602b7a0 Enhance FormatStatusText(), other minor cosmetics 2017-03-08 22:59:35 +01:00
seatedscribe
705b74b3ba Merge remote-tracking branch 'upstream/develop' into feature/import-csv-format 2017-03-08 22:52:39 +01:00
Jonathan White
31494ec327 Enhance attribute entry and add protected attributes (#220)
* Allow protected attributes to be hidden
* Entry area is resizable
* Added test cases for protected attributes
2017-03-07 22:38:18 -05:00
Janek Bevendorff
a1e1a33308 Merge pull request #378 from keepassxreboot/feature/view-references
Highlight reference field in Database view
2017-03-07 22:33:06 +01:00
thez3ro
78acdf9095 pointer to referenceRegExp 2017-03-07 20:16:51 +01:00
thez3ro
40851409fb reuse referenceRegExp 2017-03-07 17:20:57 +01:00
thez3ro
a03e354504 highlight reference field in Database view 2017-03-07 17:20:57 +01:00
Jonathan White
e91a41401c Added current pledgie campaign 2017-03-06 22:08:43 -05:00
seatedscribe
f4791c19e1 Assign uuid to newborn groups 2017-03-06 23:05:06 +01:00
Janek Bevendorff
2ec500f926 Reorder link dependencies 2017-03-06 13:51:52 +01:00
Janek Bevendorff
3c1271b1c4 Merge branch 'develop' into feature/yubikey 2017-03-06 13:49:48 +01:00
seatedscribe
39057a6aa0 Better widget positions, removed futile message when no errors shows up 2017-03-06 00:59:40 +01:00
seatedscribe
41f9c3d2a1 Better handle of parser status messages (critical/not critical)
Use of messageWidget for displaying parser status messages
setRootGroup assigns the right label to the root db folder
test uses portable QTemporaryFile instead of hardcoded file
2017-03-05 21:27:29 +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
TheZ3ro
1e1428c73d Merge pull request #370 from mrrsm/feature/references
Add feature to handle field references, resolves #75
2017-03-05 17:34:11 +01:00
TheZ3ro
4b8a2450bd Merge branch 'develop' into feature/references 2017-03-05 17:26:16 +01:00
Jonathan White
b6b2e812c1 Removed Google Groups Link and Added IRC info 2017-03-05 09:52:13 -05:00
Ryan Matthews
97150034bc Fix clone entry gui test 2017-03-04 19:49:33 -05: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
Janek Bevendorff
6bd342f63a Merge pull request #374 from louib/fix/crashDeleteSearch
Fixes crash when deleting in search mode, resolves #369.
2017-03-04 19:33:13 +01:00
Louis-Bertrand Varin
b2fa6fca82 Fixes crash when deleting in search mode. 2017-03-04 12:19:18 -05:00
Janek Bevendorff
5df7b9aa85 Merge branch 'develop' into feature/yubikey 2017-03-03 22:04:55 +01:00
Janek Bevendorff
37c9ad8e8d Merge pull request #368 from keepassxreboot/feature/xc-flag-changes
Compile auto-type by default and encapsulate all networking code using WITH_XC_HTTP
2017-03-03 12:38:11 +01:00
Jonathan White
7ec8d4c3f6 Fixed WITH_XC_AUTOTYPE and WITH_XC_HTTP descriptions 2017-03-02 22:07:42 -05:00
Jonathan White
e81564387c Cleanup 2017-03-02 19:49:32 -05:00
Jonathan White
3139ae1528 WITH_XC_AUTOTYPE defaults to ON and WITH_XC_HTTP includes ALL networking 2017-03-02 18:44:01 -05:00
Jonathan White
cdce9e27fb Merge pull request #344 from rockihack/windows-dacl
Prevent memory dumps on windows.
2017-03-02 17:34:53 -05:00
Janek Bevendorff
9049d01a5e Merge branch 'master' into develop 2017-03-02 22:53:25 +01:00
rockihack
cdf54b07c5 Add more detailed comment. 2017-03-02 19:24:31 +01:00
Janek Bevendorff
4e9bf53035 Merge branch 'release/2.1.3' into develop 2017-03-02 13:53:13 +01:00
John Lindgren
ac0178d2c7 closeEvent() should always hide the window, never raise it.
This fixes an issue on X11 where Alt-F4 would not close the window, due
to toggleWindow() believing the window is inactive and trying to raise
it.  Avoid the problem by closing the window unconditionally.
2017-03-02 06:22:57 -05:00
Janek Bevendorff
7eb7dbe0be Merge branch 'develop' into feature/yubikey 2017-03-01 23:37:52 +01:00
Janek Bevendorff
93c212f28d Merge branch 'release/2.1.3' into develop 2017-03-01 23:37:14 +01:00
Jonathan White
4061fc7cf8 Delete a custom icon with multiple entries using it (#357)
* Made it possible to delete a custom icon with multiple entries using it
2017-02-28 22:45:40 -05:00
louib
8f15ad06f3 Merge pull request #358 from keepassxreboot/feature/update-readme
Update README to reflect current text from our website
2017-02-28 21:21:43 -05:00
Janek Bevendorff
5654dc9907 Update README to reflect current text from our website 2017-02-28 14:42:46 +01:00
rockihack
6d69f0b547 Grant minimal access rights to the user associated with the process token. 2017-02-26 22:59:21 +01:00
Janek Bevendorff
6125988f35 Mark CMake library variables as advanced 2017-02-26 18:39:03 +01:00
Janek Bevendorff
0a85279bcb Enable Yubikey in release-tool by default 2017-02-26 00:08:48 +01:00
Janek Bevendorff
3715286eba Hide close button on YubiKey user interaction message 2017-02-25 22:09:55 +01:00
Janek Bevendorff
3230206b69 Merge branch 'develop' into feature/yubikey 2017-02-25 22:04:57 +01:00
Janek Bevendorff
0f1c518592 Merge pull request #347 from keepassxreboot/feature/optimize-message-widget
Feature/optimize message widget
2017-02-25 22:03:56 +01:00
Janek Bevendorff
9ba88838ba Use white close icon and add more padding to message widget 2017-02-25 21:45:34 +01:00
Janek Bevendorff
48366d245c Add CMake feature description 2017-02-25 17:14:10 +01:00
Janek Bevendorff
44206cf088 Fix stub compilation 2017-02-25 17:04:00 +01:00
Janek Bevendorff
84f2520924 Fix message widget style on OS X 2017-02-25 16:50:24 +01:00
Janek Bevendorff
6e2254c13d Don't fall back to ugly Qt close icon 2017-02-25 16:09:26 +01:00
Janek Bevendorff
1f6f7b614c Merge branch 'release/2.1.3' into develop 2017-02-25 04:20:08 +01:00
rockihack
153dc620c8 Add #ifdef Q_OS_WIN guard. 2017-02-25 01:35:47 +01:00
rockihack
d0ebaff7b4 Prevent memory dumps on windows. 2017-02-25 01:12:01 +01:00
Janek Bevendorff
e25e7ff4a2 Merge branch 'develop' into feature/yubikey 2017-02-25 01:09:59 +01:00
Janek Bevendorff
0b48e68a3c Merge pull request #340 from keepassxreboot/feature/rework-settings
User interface rework of settings and "About" dialog
2017-02-25 01:08:45 +01:00
Janek Bevendorff
c248944dc1 Remove window title bar context help button 2017-02-25 00:52:51 +01:00
Janek Bevendorff
204bf81dd1 Resize About dialog to minimum size, even out layout spacings and open it as a dialog 2017-02-25 00:41:53 +01:00
Jonathan White
f25ad83a02 Removed header from autotype window listview; replaced with groupbox 2017-02-24 16:59:16 -05:00
Janek Bevendorff
a001553c5e Fix warnings about Crypto already having been initialized 2017-02-24 21:06:23 +01:00
Janek Bevendorff
9a94c6d85e Remove debug output to reduce console spam when running in debug mode 2017-02-24 20:50:06 +01:00
Janek Bevendorff
46942413db Fix unit test crash 2017-02-24 19:47:03 +01:00
Janek Bevendorff
434d0fb1c0 Merge branch 'develop' into feature/yubikey 2017-02-24 18:48:32 +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
18844d096a Make other YubiKey driver methods thread-safe 2017-02-24 17:50:19 +01:00
Janek Bevendorff
b10cb1c83c Show YubiKey message from MainWindow to ensure it's always shown when a challenge is generated 2017-02-24 17:27:27 +01:00
Janek Bevendorff
ed085776c7 Make HTTP port input field smaller 2017-02-24 16:36:51 +01:00
Janek Bevendorff
492e320628 Shorten KeePassHTTP checkbox description and only enable settings when it's checked 2017-02-24 16:36:14 +01:00
Janek Bevendorff
d6c48a5cf1 Show message when user needs to touch their YubiKey (still buggy when using multiple databases) 2017-02-24 03:25:08 +01:00
Janek Bevendorff
44ac7d152b Use better variable names 2017-02-24 01:09:24 +01:00
Janek Bevendorff
70816f90b2 Make challenge() member thread-safe 2017-02-24 01:05:31 +01:00
Janek Bevendorff
093fe5c7ef Use QSharedPointer instead of cloning YkChallengeResponseKey and make it a QObject to allow emitting signals 2017-02-23 23:52:36 +01:00
Janek Bevendorff
5e664e3a06 Use consistent terminology 2017-02-23 02:11:48 +01:00
Janek Bevendorff
0f8c12aaf4 Fix Qt Designer HTML lapses 2017-02-23 01:58:29 +01:00
Janek Bevendorff
8a75acb985 Remove productVersion() which is included in prettyProductName() 2017-02-23 01:16:56 +01:00
Janek Bevendorff
1cef08e92b Only query operating system stats on Qt >= 5.4 2017-02-23 01:08:26 +01:00
Janek Bevendorff
1d79d342c0 Rework About dialog 2017-02-23 00:49:23 +01:00
Janek Bevendorff
a58700c78f Fix selection background on Windows 2017-02-22 23:35:49 +01:00
Janek Bevendorff
79ab7a1062 Use better default row width for history view and enable alternating row colors 2017-02-22 19:10:13 +01:00
Janek Bevendorff
fcadee550e Fix layout of group edit widget 2017-02-22 18:36:51 +01:00
Janek Bevendorff
852d194b39 Adjust message widget color to look less dirty 2017-02-22 18:29:15 +01:00
Janek Bevendorff
08e50ac72b Use correct icons for group edit 2017-02-22 18:02:44 +01:00
Janek Bevendorff
d98249814d Rework HTTP settings 2017-02-22 17:53:39 +01:00
Janek Bevendorff
9715ba0c8a Rework security settings, set sane default timeout value 2017-02-22 16:08:06 +01:00
Janek Bevendorff
7abebabf4f Rework general settings page 2017-02-22 15:36:37 +01:00
Janek Bevendorff
0892d1c744 Merge branch 'develop' into fix/settingsAlignment 2017-02-22 14:15:50 +01:00
Janek Bevendorff
a938b7aadb Merge branch 'release/2.1.3' into develop 2017-02-22 14:13:58 +01:00
Janek Bevendorff
d24c9322cc Use dedicated icon for each category 2017-02-22 14:05:59 +01:00
Janek Bevendorff
ad2ccae5db Fix funny resizing bug and increase min-padding 2017-02-22 04:24:34 +01:00
Janek Bevendorff
74afd8e819 Make widget scalable and set minimum width based on the widget text 2017-02-22 03:39:13 +01:00
Janek Bevendorff
cee297b218 Move category tab widgets to separate widget and hide history category when there is no history 2017-02-22 01:05:36 +01:00
Janek Bevendorff
851c7b891e Show icons in vertical tab bar
TODO: use the correct icons, move vertical tab bar into separate widget
2017-02-21 21:34:13 +01:00
Janek Bevendorff
0064f5dcfd Merge branch 'develop' into fix/settingsAlignment 2017-02-21 13:15:57 +01:00
Janek Bevendorff
e93e4a9931 Allow opening of unprotected databases (but don't allow creating them) 2017-02-21 02:40:23 +01:00
Janek Bevendorff
91761a2bea Only poll YubiKey for currently visible tab 2017-02-21 02:19:11 +01:00
Janek Bevendorff
8e91a89a37 Force at least one encryption key (no more unencrypted databases) 2017-02-21 01:53:57 +01:00
Janek Bevendorff
b2650c5a96 Hide UI elements when KeePassXC was compiled without -DWITH_XC_YUBIKEY 2017-02-21 01:06:32 +01:00
Janek Bevendorff
8d3e0687a0 Restructure doc comments and make hard-coded strings translatable 2017-02-21 00:28:01 +01:00
Janek Bevendorff
2d4e08e060 Warn user when no authentication factor was chosen 2017-02-20 23:35:03 +01:00
Janek Bevendorff
5d068dfb23 Show busy indicator while scanning for YubiKeys 2017-02-20 23:20:32 +01:00
Janek Bevendorff
c49aa6beef Show error message when trying to use challenge response without YubiKey 2017-02-20 22:50:12 +01:00
Janek Bevendorff
c7defdc06f Add redetect button to ChangeMasterKeyWidget and only poll for Yubikeys when the challenge response group is enabled 2017-02-20 22:41:39 +01:00
Janek Bevendorff
eb23dda99b Remember if challenge-response was used for each database and allow to re-detect Yubikeys without closing the database first 2017-02-20 22:07:01 +01:00
Janek Bevendorff
7174549441 Align YubiKey combobox with rest of interface 2017-02-20 20:35:46 +01:00
Janek Bevendorff
a27147a75e Merge branch 'develop' into feature/yubikey 2017-02-20 20:24:38 +01:00
Janek Bevendorff
a37a90c8c7 Merge branch 'release/2.1.3' into develop 2017-02-20 01:17:30 +01:00
Janek Bevendorff
22f161d178 Merge branch 'release/2.1.3' into develop 2017-02-20 01:14:13 +01:00
Janek Bevendorff
f5e75b5933 Merge pull request #321 from keepassxreboot/feature/relative-path-digest-file
Only use relative path in DIGEST file
2017-02-18 15:49:48 +01:00
Janek Bevendorff
0c47c2016d Only use relative path in DIGEST file 2017-02-18 14:32:40 +01:00
TheZ3ro
5adc1a12dd Merge pull request #326 from keepassxreboot/feature/debug-config-file
Load a different config when debug option enabled
2017-02-18 14:28:08 +01:00
thez3ro
2ad5e6f06a load a different config with debug option, close #290 2017-02-18 13:52:52 +01:00
Janek Bevendorff
03ab20a4b8 Merge release 2.1.2 into develop 2017-02-17 16:22:26 +01:00
Janek Bevendorff
e0e6f2b8e9 Merge branch 'release/2.1.2' into develop 2017-02-17 04:03:12 +01:00
Janek Bevendorff
79bd1f8121 Merge pull request #316 from keepassxreboot/fix/new-entry-shortcut
Revert new entry shortcut
2017-02-17 01:24:54 +01:00
thez3ro
b10b713e48 fix/revert new entry shortcut 2017-02-17 01:03:39 +01:00
TheZ3ro
fa63b3ee01 Merge pull request #311 from louib/fix/github-linguist
Add github-linguist language hints.
2017-02-16 00:03:33 +01:00
Louis-Bertrand Varin
68f033fbbe Add github-linguist language hints. 2017-02-15 16:36:02 -05:00
Janek Bevendorff
37c7318097 Merge branch 'develop' into feature/yubikey 2017-02-15 00:24:28 +01:00
TheZ3ro
b2702efc93 Merge pull request #294 from keepassxreboot/fix/recent-list-size
Fix recentListWidget size
2017-02-12 00:40:43 +01:00
thez3ro
d530c21cd7 fix recentListWidget size 2017-02-12 00:27:33 +01:00
TheZ3ro
7f51160879 Merge pull request #292 from keepassxreboot/feature/redesign-welcome-screen
Welcome screen redesign
2017-02-12 00:07:28 +01:00
thez3ro
5c80c31a70 hide recent database; fix wording 2017-02-11 23:56:26 +01:00
thez3ro
ee981c4c19 closes #204. Welcome screen redesign 2017-02-11 19:34:53 +01:00
Janek Bevendorff
589f76afca Merge pull request #291 from keepassxreboot/meta/releasetool-osx
Fix release-tool for OS X
2017-02-11 18:55:18 +01:00
Janek Bevendorff
c33ce8e0e4 Add missing target branch check 2017-02-11 18:29:50 +01:00
Janek Bevendorff
12f62df49a Parse CHANGELOG before checking out target branch 2017-02-11 17:19:46 +01:00
Janek Bevendorff
b367e105fa re-implement realpath when it does NOT exist 2017-02-11 17:08:53 +01:00
Janek Bevendorff
7ffbcebe4e Replace echo -e with printf to achieve better cross-platform compatibility 2017-02-11 17:05:28 +01:00
TheZ3ro
606a1f48c8 Merge pull request #289 from keepassxreboot/fix/ui-fix
insert newDatabase icon in ToolBar
2017-02-11 14:10:56 +01:00
thez3ro
91ce14a410 fix/add new database KeyShortcut 2017-02-11 13:49:33 +01:00
thez3ro
aef17b414c add document-new 22x22 icon 2017-02-11 12:47:41 +01:00
thez3ro
a70bf1ffb1 fix #203: insert newDatabase icon in ToolBar 2017-02-11 11:12:49 +01:00
Louis-Bertrand Varin
7e8679b6c3 Hiding tray settings for mac. 2017-02-10 21:59:33 -05:00
Louis-Bertrand Varin
f1e7167c65 Add spacers to align left. 2017-02-10 21:33:36 -05:00
Louis-Bertrand Varin
145f64bdfc Regroup minimize window. 2017-02-10 20:49:53 -05:00
Louis-Bertrand Varin
3821ea2c74 Reorder items. 2017-02-10 17:06:26 -05:00
Jonathan White
586e6f1e1b Merge pull request #162 from keepassxreboot/migrate/78-inline-messages
KeePassX PR Migration: #78 Inline Messages
2017-02-09 20:56:21 -05:00
Janek Bevendorff
bf419d18a9 Update KMessageWidget files in COPYING also [skip ci] 2017-02-10 02:50:46 +01:00
Janek Bevendorff
94f8650ca4 Rename KMessageWidget files to match our coding style 2017-02-10 02:34:16 +01:00
Janek Bevendorff
41d5111684 Use KMessageWidget also for new error messages 2017-02-10 02:26:10 +01:00
Janek Bevendorff
b6ea06ba24 Update KMessageWidget 2017-02-10 02:26:07 +01:00
Janek Bevendorff
84222e8078 Add license notice for KMessageWidget 2017-02-10 02:26:05 +01:00
Pedro Alves
6e7f826e19 Added licence header. 2017-02-10 02:26:02 +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
Pedro Alves
c2826bb1af Replace MessageBox Dialog with inline MessageWidget in
EditWidget and in UnlockDatabaseWidget.
Add missing method to show Information Message.
2017-02-10 02:25:58 +01:00
Pedro Alves
8fa070f01c Show inline message when unable to load the Key File. 2017-02-10 02:25:55 +01:00
Pedro Alves
3c4af1a194 Replace MessageBox dialogs that don't require user interaction with
inline MessageWidget in ChangeMasterKeyWidget.
2017-02-10 02:25:53 +01:00
Pedro Alves
a710181388 Replaced MessageBox dialogs with inline MessageWidget in
DatabaseOpenWidget.
2017-02-10 02:25:51 +01:00
Pedro Alves
c6ad476cb7 Added kmessagewidget from subsurface project
(https://github.com/torvalds/subsurface, commit:
82a946152b7f1da177344937acbc9d3cb5b0ccbf).
Added MessageWidget class.
2017-02-10 02:25:48 +01:00
Jonathan White
425427c96c Merge pull request #174 from keepassxreboot/meta/release-preparation
Release preparation script
2017-02-09 19:47:33 -05:00
Janek Bevendorff
ac4346719b Merge pull request #268 from keepassxreboot/fix/custom-attribute
Fix autotype custom-attribute placeholder
2017-02-09 17:21:25 +01:00
Janek Bevendorff
e2c9fe8d12 Merge branch 'develop' into fix/custom-attribute 2017-02-09 17:12:24 +01:00
Janek Bevendorff
423de39ad0 Merge pull request #267 from keepassxreboot/fix/autotype-space
Allow space keyword in autotype sequence
2017-02-08 18:16:33 +01:00
thez3ro
51c668a0fd fix tests with new CustomAttribute format 2017-02-08 01:14:52 +01:00
thez3ro
8408e7fdb4 fix #218 custom attribute like KeePass interface 2017-02-08 01:04:05 +01:00
thez3ro
2975eb315f use space from XCB KeySym 2017-02-08 00:33:52 +01:00
thez3ro
0ac05dbb0f fix #256 space in autotype sequence 2017-02-08 00:11:16 +01:00
Jonathan White
7db7747cb0 Merge remote-tracking branch 'origin/master' into develop 2017-02-06 20:29:21 -05:00
Janek Bevendorff
343a1e2a76 Also build http 2017-02-07 01:24:18 +01:00
Louis-Bertrand Varin
26fdb19344 Typo is snap description. 2017-02-05 14:08:37 -05:00
Louis-Bertrand Varin
0091cb3f23 Fixes database modified after discard 2017-01-28 22:21:44 -05:00
Jonathan White
2afd21c7ba Merge pull request #167 from keepassxreboot/migrate/122-twofish
KeePassX PR Migration: #122 Twofish cypher support
2017-01-28 17:49:20 -05:00
Janek Bevendorff
4dab30ce6f Break instead of returning 2017-01-28 17:53:19 +01:00
Janek Bevendorff
75dc21c66d Implement Twofish CBC encryption and decryption tests 2017-01-28 17:53:17 +01:00
Timothy Redaelli
b0a4d7278a Add Algorithm label / ComboBox in Database settings form 2017-01-28 17:53:14 +01:00
Timothy Redaelli
a01607e869 Add support for Twofish in KeePass2 code 2017-01-28 17:53:11 +01:00
Kyle Manna
5a3ed27fed tests: yk: Initialize Crypto class
Initialize the Crypto class before running the tests as YubiKey
detection code depends on it for random data.
2017-01-14 17:58:05 -08:00
Kyle Manna
a7cf39c7cd gui: ChangeMasterKeyWidget: Clear YubiKeys detected
* Clear the YubiKey detected list on each load.
* In the event the YubiKey was removed, it will no longer be displayed.
* If it's still present it won't be duplicated.
2017-01-14 17:39:57 -08:00
Janek Bevendorff
e17576a6f7 Merge branch 'develop' into feature/yubikey 2017-01-15 03:20:21 +02:00
Kyle Manna
f33cd15419 gui: Clear YubiKeys detected on each load
* Clear the YubiKey detected list on each load.
* In the event the YubiKey was removed, it will no longer be displayed.
* If it's still present it won't be duplicated.
2017-01-14 17:08:48 -08:00
Kyle Manna
05774854ef travis-ci: Add YubiKey development libraries
* With these packages cmake will detect the YubiKey headers and
  libraries and build in YubiKey support.
2017-01-14 16:15:36 -08:00
Kyle Manna
ef06165ea2 keys: CompositeKey: Change Q_FOREACH to C++11 for()
* Use the C++11 range based loop as recommended from
  https://github.com/keepassxreboot/keepassxc/pull/119

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-08 18:47:54 -08:00
Pedro Alves
d398d367c1 Allow a previously yubikey protected database to be saved without the yubikey challenge-response code. 2017-01-08 16:48:12 -08:00
Kyle Manna
951fa96848 YubiKey: Fix database locking
* Save the master seed upon first challenge so it can be used as a
  challenge at a later point.
* When verifyKey() is called, verify that the challenge is successful.
* Uncheck YubiKey box to not leak information about how the database is
  protected.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-08 16:48:06 -08:00
Kyle Manna
77cc99acd3 YubiKey: Clean-up master seed challenge
* Tweak the logic so it more closely resembles other code (i.e.
  trasnformKey()). Matches existing style better.
* Save the challengeResponseKey in the database structure so that
  it can be referred to later (i.e. database unlocking).

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-08 16:47:39 -08:00
Kyle Manna
62190d79be YubiKey: Whitespace clean-up
* This was bugging me.  Oops.
* No functional changes.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-08 16:43:30 -08:00
Kyle Manna
f7ee528d41 YubiKey: Retry to recover hotplugging
* Attempt one retry in the event the event the device was removed and
  re-inserted.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-08 16:43:23 -08:00
Kyle Manna
faa055010f challenge: Propagate failed challenge to caller
* If a removed Yubikey is to blame, re-inserting the Yubikey won't
  resolve the issue.  Hot plug isn't supported at this point.
* The caller should detect the error and cancel the database write.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-08 16:40:25 -08:00
Kyle Manna
ba8fd25604 gui: Add YubiKey support to widgets
* Add YubiKey support to the GUI widgets.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-08 16:31:50 -08:00
Kyle Manna
9556d8e6da tests: Add YubiKey Tests
* Basic testing for YubiKey code.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-07 23:20:27 -08:00
Kyle Manna
5b8b4c8c7b keys: yk: Implement ChallengeResponseKey for YubiKey
* Implement a YubiKey challenge response class.  One object will be
  created for each challenge response key available.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-07 23:20:16 -08:00
Kyle Manna
82aed2caab keys: yk: Add YubiKey hardware driver support
* Use compile time detection of the YubiKey libraries and link against
  the libraries if present.  Can be disabled with:

      $ cmake -DCMAKE_DISABLE_FIND_PACKAGE_YubiKey=FALSE

* A stub file provides empty calls for all the function calls integrated
  in to the UI to support this.  In the future a more modular approach
  maybe better, but opting for simplicity initially.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-07 23:18:59 -08:00
Kyle Manna
add4846d79 format: Add challenge response result to final key hash
* The challengeMasterSeed() function return empty if not present
  maintaining backwards compatability.
* This commit is where the challenge response result is computed into
  the final key  used to encrypt or decrypt the database.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-07 23:18:55 -08:00
Kyle Manna
e354a0ee0e database: Pass master seed to challenge response keys
* Pass the master seed from the database to CompositeKey::challenge()
  function which will in turn issue challenges to all selected
  drivers.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-07 23:16:39 -08:00
Kyle Manna
ccd6704b8f keys: CompositeKey: Add ChallengeResponseKey support
* Each Challenge Response Key consists of a list of regular keys and now
  challenge response keys.
* Copy ChallengeResponseKeys when copying the object.
* Challenge consists of challenging each driver in the list and hashing
  the concatenated data result using SHA256.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-07 23:14:43 -08:00
Kyle Manna
9bdb41a727 keys: Add ChallengeResponseKey header
* Add initial header file for forthcoming challenge response support.
* A ChallengeResponseKey operates by submitting some challenge data and
  getting a deterministic result.
* In the case of the forthcoming YubiKey integration, the master seed is
  submitted as the challenge to the YubiKey hardware and the YubiKey
  returns a HMAC-SHA1 response.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
2017-01-07 23:03:47 -08:00
337 changed files with 47854 additions and 7467 deletions

89
.clang-format Normal file
View File

@@ -0,0 +1,89 @@
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: true
AfterFunction: true
AfterControlStatement: false
AfterEnum: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never
...

4
.gitattributes vendored
View File

@@ -7,3 +7,7 @@ src/version.h.cmake export-subst
snapcraft.yaml export-ignore snapcraft.yaml export-ignore
make_release.sh export-ignore make_release.sh export-ignore
AppImage-Recipe.sh export-ignore AppImage-Recipe.sh export-ignore
# github-linguist language hints
*.h linguist-language=C++
*.cpp linguist-language=C++

View File

@@ -3,11 +3,11 @@
## Description ## Description
<!--- Describe your changes in detail --> <!--- Describe your changes in detail -->
## Motivation and Context ## Motivation and context
<!--- Why is this change required? What problem does it solve? --> <!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. --> <!--- If it fixes an open issue, please link to the issue here. -->
## How Has This Been Tested? ## How has this been tested?
<!--- Please describe in detail how you tested your changes. --> <!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to --> <!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. --> <!--- see how your change affects other areas of the code, etc. -->
@@ -29,5 +29,6 @@
- ✅ I have read the **CONTRIBUTING** document. **[REQUIRED]** - ✅ I have read the **CONTRIBUTING** document. **[REQUIRED]**
- ✅ My code follows the code style of this project. **[REQUIRED]** - ✅ My code follows the code style of this project. **[REQUIRED]**
- ✅ All new and existing tests passed. **[REQUIRED]** - ✅ All new and existing tests passed. **[REQUIRED]**
- ✅ I have compiled and verified my code with `-DWITH_ASAN=ON`. **[REQUIRED]**
- ✅ My change requires a change to the documentation and I have updated it accordingly. - ✅ My change requires a change to the documentation and I have updated it accordingly.
- ✅ I have added tests to cover my changes. - ✅ I have added tests to cover my changes.

2
.gitignore vendored
View File

@@ -4,3 +4,5 @@ release*/
.idea/ .idea/
*.iml *.iml
*.kdev4 *.kdev4
\.vscode/

View File

@@ -13,15 +13,15 @@ compiler:
- gcc - gcc
env: env:
- CONFIG=Release - CONFIG=Release ASAN_OPTIONS=detect_odr_violation=1:leak_check_at_exit=0
- CONFIG=Debug - CONFIG=Debug ASAN_OPTIONS=detect_odr_violation=1:leak_check_at_exit=0
git: git:
depth: 3 depth: 3
before_install: before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install cmake libmicrohttpd10 libmicrohttpd-dev libxi-dev qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev libxtst-dev xvfb; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install cmake libclang-common-3.5-dev libxi-dev qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev libxtst-dev xvfb libyubikey-dev libykpers-1-dev; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq cmake || brew install cmake; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq cmake || brew install cmake; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq qt5 || brew install qt5; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq qt5 || brew install qt5; fi
@@ -32,7 +32,7 @@ before_script:
- mkdir build && pushd build - mkdir build && pushd build
script: script:
- cmake -DCMAKE_BUILD_TYPE=${CONFIG} -DWITH_GUI_TESTS=ON -DWITH_XC_HTTP=ON -DWITH_XC_AUTOTYPE=ON -DWITH_XC_YUBIKEY=ON $CMAKE_ARGS .. - cmake -DCMAKE_BUILD_TYPE=${CONFIG} -DWITH_GUI_TESTS=ON -DWITH_ASAN=ON -DWITH_XC_HTTP=ON -DWITH_XC_AUTOTYPE=ON -DWITH_XC_YUBIKEY=ON $CMAKE_ARGS ..
- make -j2 - make -j2
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make test ARGS+="-E testgui --output-on-failure"; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then make test ARGS+="-E testgui --output-on-failure"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run -a --server-args="-screen 0 800x600x24" make test ARGS+="-R testgui --output-on-failure"; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run -a --server-args="-screen 0 800x600x24" make test ARGS+="-R testgui --output-on-failure"; fi

View File

@@ -1,3 +1,36 @@
2.2.0 (2017-06-23)
=========================
- Added YubiKey 2FA integration for unlocking databases [#127]
- Added TOTP support [#519]
- Added CSV import tool [#146, #490]
- Added KeePassXC CLI tool [#254]
- Added diceware password generator [#373]
- Added support for entry references [#370, #378]
- Added support for Twofish encryption [#167]
- Enabled DEP and ASLR for in-memory protection [#371]
- Enabled single instance mode [#510]
- Enabled portable mode [#645]
- Enabled database lock on screensaver and session lock [#545]
- Redesigned welcome screen with common features and recent databases [#292]
- Multiple updates to search behavior [#168, #213, #374, #471, #603, #654]
- Added auto-type fields {CLEARFIELD}, {SPACE}, {{}, {}} [#267, #427, #480]
- Fixed auto-type errors on Linux [#550]
- Prompt user prior to executing a cmd:// URL [#235]
- Entry attributes can be protected (hidden) [#220]
- Added extended ascii to password generator [#538]
- Added new database icon to toolbar [#289]
- Added context menu entry to empty recycle bin in databases [#520]
- Added "apply" button to entry and group edit windows [#624]
- Added macOS tray icon and enabled minimize on close [#583]
- Fixed issues with unclean shutdowns [#170, #580]
- Changed keyboard shortcut to create new database to CTRL+SHIFT+N [#515]
- Compare window title to entry URLs [#556]
- Implemented inline error messages [#162]
- Ignore group expansion and other minor changes when making database "dirty" [#464]
- Updated license and copyright information on souce files [#632]
- Added contributors list to about dialog [#629]
2.1.4 (2017-04-09) 2.1.4 (2017-04-09)
========================= =========================

View File

@@ -1,4 +1,5 @@
# Copyright (C) 2010 Felix Geyer <debfx@fobos.de> # Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
# Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -25,6 +26,9 @@ cmake_minimum_required(VERSION 2.8.12)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# Support Visual Studio Code
include(CMakeToolsHelpers OPTIONAL)
include(CheckCCompilerFlag) include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
include(CheckCXXSourceCompiles) include(CheckCXXSourceCompiles)
@@ -32,14 +36,21 @@ include(CheckCXXSourceCompiles)
option(WITH_TESTS "Enable building of unit tests" ON) option(WITH_TESTS "Enable building of unit tests" ON)
option(WITH_GUI_TESTS "Enable building of GUI tests" OFF) option(WITH_GUI_TESTS "Enable building of GUI tests" OFF)
option(WITH_DEV_BUILD "Use only for development. Disables/warns about deprecated methods." OFF) option(WITH_DEV_BUILD "Use only for development. Disables/warns about deprecated methods." OFF)
option(WITH_COVERAGE "Use to build with coverage tests. (GCC ONLY)." OFF) option(WITH_ASAN "Enable address sanitizer checks (Linux only)" OFF)
option(WITH_COVERAGE "Use to build with coverage tests (GCC only)." OFF)
option(WITH_APP_BUNDLE "Enable Application Bundle for OS X" ON)
option(WITH_XC_AUTOTYPE "Include Autotype." OFF) option(WITH_XC_AUTOTYPE "Include Auto-Type." ON)
option(WITH_XC_HTTP "Include KeePassHTTP." OFF) option(WITH_XC_HTTP "Include KeePassHTTP and Custom Icon Downloads." OFF)
option(WITH_XC_YUBIKEY "Include Yubikey support." OFF) option(WITH_XC_YUBIKEY "Include YubiKey support." OFF)
set(KEEPASSXC_VERSION "2.1.4") # Process ui files automatically from source files
set(KEEPASSXC_VERSION_NUM "2.1.4") set(CMAKE_AUTOUIC ON)
set(KEEPASSXC_VERSION_MAJOR "2")
set(KEEPASSXC_VERSION_MINOR "2")
set(KEEPASSXC_VERSION_PATCH "0")
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}")
if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_COMPILER_IS_CLANG 1) set(CMAKE_COMPILER_IS_CLANG 1)
@@ -68,18 +79,39 @@ endmacro(add_gcc_compiler_flags)
add_definitions(-DQT_NO_EXCEPTIONS -DQT_STRICT_ITERATORS -DQT_NO_CAST_TO_ASCII) add_definitions(-DQT_NO_EXCEPTIONS -DQT_STRICT_ITERATORS -DQT_NO_CAST_TO_ASCII)
add_gcc_compiler_flags("-fno-common -fstack-protector --param=ssp-buffer-size=4") if(WITH_APP_BUNDLE)
add_definitions(-DWITH_APP_BUNDLE)
endif()
add_gcc_compiler_flags("-fno-common")
add_gcc_compiler_flags("-Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long") add_gcc_compiler_flags("-Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long")
add_gcc_compiler_flags("-Wformat=2 -Wmissing-format-attribute") add_gcc_compiler_flags("-Wformat=2 -Wmissing-format-attribute")
add_gcc_compiler_flags("-fvisibility=hidden") add_gcc_compiler_flags("-fvisibility=hidden")
add_gcc_compiler_cxxflags("-fvisibility-inlines-hidden") add_gcc_compiler_cxxflags("-fvisibility-inlines-hidden")
if((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8.999) OR CMAKE_COMPILER_IS_CLANGXX)
add_gcc_compiler_flags("-fstack-protector-strong")
else()
add_gcc_compiler_flags("-fstack-protector --param=ssp-buffer-size=4")
endif()
add_gcc_compiler_cxxflags("-fno-exceptions -fno-rtti") add_gcc_compiler_cxxflags("-fno-exceptions -fno-rtti")
add_gcc_compiler_cxxflags("-Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual") add_gcc_compiler_cxxflags("-Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual")
add_gcc_compiler_cflags("-Wchar-subscripts -Wwrite-strings") add_gcc_compiler_cflags("-Wchar-subscripts -Wwrite-strings")
if(WITH_ASAN)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
message(FATAL_ERROR "WITH_ASAN is only supported on Linux at the moment.")
endif()
add_gcc_compiler_flags("-fsanitize=address -DWITH_ASAN")
if(NOT (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9))
add_gcc_compiler_flags("-fsanitize=leak -DWITH_LSAN")
endif()
endif()
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER) string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
if (CMAKE_BUILD_TYPE_LOWER MATCHES (release|relwithdebinfo|minsizerel)) if (CMAKE_BUILD_TYPE_LOWER MATCHES "(release|relwithdebinfo|minsizerel)")
add_gcc_compiler_flags("-D_FORTIFY_SOURCE=2") add_gcc_compiler_flags("-D_FORTIFY_SOURCE=2")
endif() endif()
@@ -105,10 +137,14 @@ if(CMAKE_COMPILER_IS_GNUCC)
endif() endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if (CMAKE_COMPILER_IS_CLANGXX)
add_gcc_compiler_flags("-Qunused-arguments")
endif()
add_gcc_compiler_flags("-pie -fPIE")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed -Wl,--no-undefined") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed -Wl,--no-undefined")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,relro") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
endif() endif()
add_gcc_compiler_cxxflags("-std=c++11") add_gcc_compiler_cxxflags("-std=c++11")
@@ -127,30 +163,37 @@ if(MINGW)
set(CMAKE_RC_COMPILER_INIT windres) set(CMAKE_RC_COMPILER_INIT windres)
enable_language(RC) enable_language(RC)
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>") set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
link_libraries(ws2_32 wsock32) if(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
# Enable DEP and ASLR
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--nxcompat -Wl,--dynamicbase")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--nxcompat -Wl,--dynamicbase")
endif()
endif() endif()
if(APPLE OR MINGW) if(APPLE AND WITH_APP_BUNDLE OR MINGW)
set(PROGNAME KeePassXC) set(PROGNAME KeePassXC)
else() else()
set(PROGNAME keepassxc) set(PROGNAME keepassxc)
endif() endif()
if(APPLE AND "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local") if(APPLE AND WITH_APP_BUNDLE AND "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
set(CMAKE_INSTALL_PREFIX "/Applications") set(CMAKE_INSTALL_PREFIX "/Applications")
endif() endif()
if(MINGW) if(MINGW)
set(CLI_INSTALL_DIR ".")
set(BIN_INSTALL_DIR ".") set(BIN_INSTALL_DIR ".")
set(PLUGIN_INSTALL_DIR ".") set(PLUGIN_INSTALL_DIR ".")
set(DATA_INSTALL_DIR "share") set(DATA_INSTALL_DIR "share")
elseif(APPLE) elseif(APPLE AND WITH_APP_BUNDLE)
set(CLI_INSTALL_DIR "/usr/local/bin")
set(BIN_INSTALL_DIR ".") set(BIN_INSTALL_DIR ".")
set(PLUGIN_INSTALL_DIR "${PROGNAME}.app/Contents/PlugIns") set(PLUGIN_INSTALL_DIR "${PROGNAME}.app/Contents/PlugIns")
set(DATA_INSTALL_DIR "${PROGNAME}.app/Contents/Resources") set(DATA_INSTALL_DIR "${PROGNAME}.app/Contents/Resources")
else() else()
include(GNUInstallDirs) include(GNUInstallDirs)
set(CLI_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}") set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
set(PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/keepassxc") set(PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/keepassxc")
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/keepassxc") set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/keepassxc")
@@ -161,6 +204,7 @@ if(WITH_TESTS)
endif(WITH_TESTS) endif(WITH_TESTS)
find_package(Qt5Core 5.2 REQUIRED) find_package(Qt5Core 5.2 REQUIRED)
find_package(Qt5Network 5.2 REQUIRED)
find_package(Qt5Concurrent 5.2 REQUIRED) find_package(Qt5Concurrent 5.2 REQUIRED)
find_package(Qt5Widgets 5.2 REQUIRED) find_package(Qt5Widgets 5.2 REQUIRED)
find_package(Qt5Test 5.2 REQUIRED) find_package(Qt5Test 5.2 REQUIRED)
@@ -194,6 +238,13 @@ if(NOT ZLIB_SUPPORTS_GZIP)
message(FATAL_ERROR "zlib 1.2.x or higher is required to use the gzip format") message(FATAL_ERROR "zlib 1.2.x or higher is required to use the gzip format")
endif() endif()
# Optional
if(WITH_XC_YUBIKEY)
find_package(YubiKey REQUIRED)
include_directories(SYSTEM ${YUBIKEY_INCLUDE_DIRS})
endif()
if(UNIX) if(UNIX)
check_cxx_source_compiles("#include <sys/prctl.h> check_cxx_source_compiles("#include <sys/prctl.h>
int main() { prctl(PR_SET_DUMPABLE, 0); return 0; }" int main() { prctl(PR_SET_DUMPABLE, 0); return 0; }"
@@ -222,7 +273,6 @@ include(FeatureSummary)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(share) add_subdirectory(share)
add_subdirectory(utils)
if(WITH_TESTS) if(WITH_TESTS)
add_subdirectory(tests) add_subdirectory(tests)
endif(WITH_TESTS) endif(WITH_TESTS)
@@ -232,6 +282,6 @@ if(PRINT_SUMMARY)
feature_summary(WHAT ALL) feature_summary(WHAT ALL)
else() else()
# This will only print ENABLED and DISABLED feature # This will only print ENABLED and DISABLED feature
print_enabled_features() feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
print_disabled_features() feature_summary(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
endif() endif()

64
COPYING
View File

@@ -1,5 +1,5 @@
KeePassX - http://www.keepassx.org/ KeePassXC - http://www.keepassxc.org/
Copyright (C) 2010-2012 Felix Geyer <debfx@fobos.de> Copyright (C) 2016-2017 KeePassXC Team <team@keepassxc.org>
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@ GNU General Public License for more details.
-------------------------------------------------------------------- --------------------------------------------------------------------
Format-Specification: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Format-Specification: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: KeePassX Upstream-Name: KeePassXC
Upstream-Contact: Felix Geyer <debfx@fobos.de> Upstream-Contact: KeePassXC Team <team@keepassxc.org>
Source: http://www.keepassx.org/ Source: http://www.keepassxc.org/
Copyright: 2010-2012, Felix Geyer <debfx@fobos.de> Copyright: 2010-2012, Felix Geyer <debfx@fobos.de>
2011-2012, Florian Geyer <blueice@fobos.de> 2011-2012, Florian Geyer <blueice@fobos.de>
@@ -27,20 +27,46 @@ Copyright: 2010-2012, Felix Geyer <debfx@fobos.de>
2000-2008, Tom Sato <VEF00200@nifty.ne.jp> 2000-2008, Tom Sato <VEF00200@nifty.ne.jp>
2013, Laszlo Papp <lpapp@kde.org> 2013, Laszlo Papp <lpapp@kde.org>
2013, David Faure <faure@kde.org> 2013, David Faure <faure@kde.org>
2016, KeePassXC Team 2016-2017, KeePassXC Team <team@keepassxc.org>
License: GPL-2 or GPL-3 License: GPL-2 or GPL-3
Comment: The "KeePassXC Team" in every copyright notice is formed by the following people:
- droidmonkey
- phoerious
- TheZ3ro <io@thezero.org>
- louib
- weslly
Every other contributor is listed on https://github.com/keepassxreboot/keepassxc/graphs/contributors
Files: cmake/GNUInstallDirs.cmake Files: cmake/GNUInstallDirs.cmake
Copyright: 2011 Nikita Krupen'ko <krnekit@gmail.com> Copyright: 2011 Nikita Krupen'ko <krnekit@gmail.com>
2011 Kitware, Inc. 2011 Kitware, Inc.
License: BSD-3-clause License: BSD-3-clause
Files: cmake/CodeCoverage.cmake
Copyright: 2012 - 2015, Lars Bilke
License: BSD-3-clause
Files: cmake/FindYubiKey.cmake
Copyright: 2014 Kyle Manna <kyle@kylemanna.com>
License: GPL-2 or GPL-3
Files: cmake/GenerateProductVersion.cmake
Copyright: 2015 halex2005 <akharlov@gmail.com>
License: MIT
Files: cmake/CodeCoverage.cmake
Copyright: 2012 - 2015, Lars Bilke
License: BSD-3-clause
Files: share/icons/application/*/apps/keepassxc.png Files: share/icons/application/*/apps/keepassxc.png
share/icons/application/scalable/apps/keepassxc.svgz share/icons/application/scalable/apps/keepassxc.svgz
share/icons/application/*/apps/keepassxc-dark.png share/icons/application/*/apps/keepassxc-dark.png
share/icons/application/scalable/apps/keepassxc-dark.svgz share/icons/application/scalable/apps/keepassxc-dark.svgz
share/icons/application/*/apps/keepassxc-locked.png share/icons/application/*/apps/keepassxc-locked.png
share/icons/application/scalable/apps/keepassxc-locked.svgz share/icons/application/scalable/apps/keepassxc-locked.svgz
share/icons/application/*/apps/keepassxc-unlocked.png
share/icons/application/scalable/apps/keepassxc-unlocked.svgz
share/icons/application/*/mimetypes/application-x-keepassxc.png share/icons/application/*/mimetypes/application-x-keepassxc.png
share/icons/application/scalable/mimetypes/application-x-keepassxc.svgz share/icons/application/scalable/mimetypes/application-x-keepassxc.svgz
Copyright: 2016, Lorenzo Stella <lorenzo.stl@gmail.com> Copyright: 2016, Lorenzo Stella <lorenzo.stl@gmail.com>
@@ -51,6 +77,8 @@ Files: share/icons/application/*/actions/auto-type.png
share/icons/application/*/actions/entry-clone.png share/icons/application/*/actions/entry-clone.png
share/icons/application/*/actions/entry-edit.png share/icons/application/*/actions/entry-edit.png
share/icons/application/*/actions/entry-new.png share/icons/application/*/actions/entry-new.png
share/icons/application/*/actions/group-empty-trash.png
share/icons/application/*/actions/help-about.png
share/icons/application/*/actions/password-generate.png share/icons/application/*/actions/password-generate.png
share/icons/database/C00_Password.png share/icons/database/C00_Password.png
share/icons/database/C01_Package_Network.png share/icons/database/C01_Package_Network.png
@@ -136,18 +164,25 @@ Files: share/icons/application/*/actions/application-exit.png
share/icons/application/*/actions/document-encrypt.png share/icons/application/*/actions/document-encrypt.png
share/icons/application/*/actions/document-new.png share/icons/application/*/actions/document-new.png
share/icons/application/*/actions/document-open.png share/icons/application/*/actions/document-open.png
share/icons/application/*/actions/document-properties.png
share/icons/application/*/actions/document-save.png share/icons/application/*/actions/document-save.png
share/icons/application/*/actions/document-save-as.png share/icons/application/*/actions/document-save-as.png
share/icons/application/*/actions/edit-clear-locationbar-ltr.png share/icons/application/*/actions/edit-clear-locationbar-ltr.png
share/icons/application/*/actions/edit-clear-locationbar-rtl.png share/icons/application/*/actions/edit-clear-locationbar-rtl.png
share/icons/application/*/actions/key-enter.png
share/icons/application/*/actions/password-generator.png share/icons/application/*/actions/password-generator.png
share/icons/application/*/actions/password-copy.png share/icons/application/*/actions/password-copy.png
share/icons/application/*/actions/password-show-*.png share/icons/application/*/actions/password-show-*.png
share/icons/application/*/actions/system-search.png share/icons/application/*/actions/system-search.png
share/icons/application/*/actions/username-copy.png share/icons/application/*/actions/username-copy.png
share/icons/application/*/actions/view-history.png
share/icons/application/*/apps/internet-web-browser.png
share/icons/application/*/apps/preferences-desktop-icons.png
share/icons/application/*/categories/preferences-other.png
share/icons/application/*/status/dialog-error.png share/icons/application/*/status/dialog-error.png
share/icons/application/*/status/dialog-information.png share/icons/application/*/status/dialog-information.png
share/icons/application/*/status/dialog-warning.png share/icons/application/*/status/dialog-warning.png
share/icons/application/*/status/security-high.png
share/icons/svg/*.svgz share/icons/svg/*.svgz
Copyright: 2007, Nuno Pinheiro <nuno@oxygen-icons.org> Copyright: 2007, Nuno Pinheiro <nuno@oxygen-icons.org>
2007, David Vignoni <david@icon-king.com> 2007, David Vignoni <david@icon-king.com>
@@ -194,7 +229,20 @@ Copyright: 2009-2010, Iowa State University
License: Boost-1.0 License: Boost-1.0
Files: src/zxcvbn/zxcvbn.* Files: src/zxcvbn/zxcvbn.*
src/utils/entropy-meter.cpp
Copyright: 2015, Tony Evans Copyright: 2015, Tony Evans
2016, KeePassXC Team
License: BSD 3-clause License: BSD 3-clause
Files: src/http/qhttp/*
Copyright: 2014, Amir Zamani
License: MIT
Files: src/gui/KMessageWidget.h
src/gui/KMessageWidget.cpp
Copyright: 2011 Aurélien Gâteau <agateau@kde.org>
2014 Dominik Haumann <dhaumann@kde.org>
License: LGPL-2.1
Files: src/totp/base32.cpp
src/totp/base32.h
Copyright: 2010 Google Inc.
License: Apache 2.0

View File

@@ -32,10 +32,12 @@ RUN set -x \
qt58base \ qt58base \
qt58tools \ qt58tools \
qt58x11extras \ qt58x11extras \
libmicrohttpd-dev \
libxi-dev \ libxi-dev \
libxtst-dev \ libxtst-dev \
zlib1g-dev \ zlib1g-dev \
libyubikey-dev \
libykpers-1-dev \
xvfb \
wget \ wget \
file \ file \
fuse \ fuse \

View File

@@ -1,31 +1,33 @@
# KeePassXC - KeePass Cross-platform Community Edition # <img src="https://keepassxc.org/logo.png" width="40" height="40"/> KeePassXC [![Travis Build Status](https://travis-ci.org/keepassxreboot/keepassxc.svg?branch=develop)](https://travis-ci.org/keepassxreboot/keepassxc) [![Coverage Status](https://coveralls.io/repos/github/keepassxreboot/keepassxc/badge.svg)](https://coveralls.io/github/keepassxreboot/keepassxc)
[![Travis Build Status](https://travis-ci.org/keepassxreboot/keepassxc.svg?branch=develop)](https://travis-ci.org/keepassxreboot/keepassxc) [![Coverage Status](https://coveralls.io/repos/github/keepassxreboot/keepassxc/badge.svg)](https://coveralls.io/github/keepassxreboot/keepassxc) KeePass Cross-platform Community Edition
## About ## About
KeePassXC is a fork of [KeePassX](https://www.keepassx.org/) that [aims to incorporate stalled pull requests, features, and bug fixes that have never made it into the main KeePassX repository](https://github.com/keepassxreboot/keepassx/issues/43). [KeePassXC](https://keepassxc.org) is a community fork of [KeePassX](https://www.keepassx.org/) with the goal to extend and improve it with new features and bugfixes to provide a feature-rich, fully cross-platform and modern open-source password manager.
## Additional features compared to KeePassX ## Additional features compared to KeePassX
- Autotype on all three major platforms (Linux, Windows, OS X) - Auto-Type on all three major platforms (Linux, Windows, OS X)
- Stand-alone password generator - Stand-alone password generator
- Password strength meter - Password strength meter
- Use website's favicons as entry icons - YubiKey HMAC-SHA1 authentication for unlocking databases
- Using website favicons as entry icons
- Merging of databases - Merging of databases
- Automatic reload when the database changed on disk - Automatic reload when the database changed on disk
- KeePassHTTP support for use with [PassIFox](https://addons.mozilla.org/en-us/firefox/addon/passifox/) in Mozilla Firefox and [chromeIPass](https://chrome.google.com/webstore/detail/chromeipass/ompiailgknfdndiefoaoiligalphfdae) in Google Chrome or Chromium. - KeePassHTTP support for use with [PassIFox](https://addons.mozilla.org/en-us/firefox/addon/passifox/) in Mozilla Firefox and [chromeIPass](https://chrome.google.com/webstore/detail/chromeipass/ompiailgknfdndiefoaoiligalphfdae) in Google Chrome or Chromium, and [passafari](https://github.com/mmichaa/passafari.safariextension/) in Safari.
- Many bug fixes
For a full list of features and changes, read the [CHANGELOG](CHANGELOG) document. For a full list of features and changes, read the [CHANGELOG](CHANGELOG) document.
### Note about KeePassHTTP ### Note about KeePassHTTP
KeePassHTTP is not a highly secure protocol and has certain flaw which allow an attacker to decrypt your passwords when they manage to intercept communication between a KeePassHTTP server and PassIFox/chromeIPass over a network connection (see [here](https://github.com/pfn/keepasshttp/issues/258) and [here](https://github.com/keepassxreboot/keepassxc/issues/147)). KeePassXC therefore strictly limits communication between itself and the browser plugin to your local computer. As long as your computer is not compromised, your passwords are fairly safe that way, but still use it at your own risk! KeePassHTTP is not a highly secure protocol and has certain flaw which allow an attacker to decrypt your passwords when they manage to intercept communication between a KeePassHTTP server and PassIFox/chromeIPass over a network connection (see [here](https://github.com/pfn/keepasshttp/issues/258) and [here](https://github.com/keepassxreboot/keepassxc/issues/147)). KeePassXC therefore strictly limits communication between itself and the browser plugin to your local computer. As long as your computer is not compromised, your passwords are fairly safe that way, but use it at your own risk!
### Installation ### Installation
Pre-compiled binaries can be found on the [downloads page](https://keepassxc.org/download). Additionally, individual Linux distributions may ship their own versions, so please check out your distribution's package list to see if KeePassXC is available. Pre-compiled binaries can be found on the [downloads page](https://keepassxc.org/download). Additionally, individual Linux distributions may ship their own versions, so please check out your distribution's package list to see if KeePassXC is available.
### Building KeePassXC yourself ### Building KeePassXC
*More detailed instructions are available in the INSTALL file or on the [Wiki page](https://github.com/keepassxreboot/keepassx/wiki/Install-Instruction-from-Source).* *More detailed instructions are available in the INSTALL file or on the [Wiki page](https://github.com/keepassxreboot/keepassxc/wiki/Building-KeePassXC).*
First, you must download the KeePassXC [source tarball](https://keepassxc.org/download#source) or check out the latest version from our [Git repository](https://github.com/keepassxreboot/keepassxc). First, you must download the KeePassXC [source tarball](https://keepassxc.org/download#source) or check out the latest version from our [Git repository](https://github.com/keepassxreboot/keepassxc).
@@ -43,9 +45,9 @@ To update the project from within the project's folder, you can run the followin
git pull git pull
``` ```
Once you have downloaded the source code, you can `cd` into the source code directory and build and install KeePassXC with Once you have downloaded the source code, you can `cd` into the source code directory, build and install KeePassXC:
``` ```bash
mkdir build mkdir build
cd build cd build
cmake -DWITH_TESTS=OFF .. cmake -DWITH_TESTS=OFF ..
@@ -53,13 +55,24 @@ make -j8
sudo make install sudo make install
``` ```
To enable autotype, add `-DWITH_XC_AUTOTYPE=ON` to the `cmake` command. KeePassHTTP support is compiled in by adding `-DWITH_XC_HTTP=ON`. If these options are not specified, KeePassXC will be built without these plugins. cmake accepts the following options:
```
-DWITH_XC_AUTOTYPE=[ON|OFF] Enable/Disable Auto-Type (default: ON)
-DWITH_XC_HTTP=[ON|OFF] Enable/Disable KeePassHTTP and custom icon downloads (default: OFF)
-DWITH_XC_YUBIKEY=[ON|OFF] Enable/Disable YubiKey HMAC-SHA1 authentication support (default: OFF)
-DWITH_TESTS=[ON|OFF] Enable/Disable building of unit tests (default: ON)
-DWITH_GUI_TESTS=[ON|OFF] Enable/Disable building of GUI tests (default: OFF)
-DWITH_DEV_BUILD=[ON|OFF] Enable/Disable deprecated method warnings (default: OFF)
-DWITH_ASAN=[ON|OFF] Enable/Disable address sanitizer checks (Linux only) (default: OFF)
-DWITH_COVERAGE=[ON|OFF] Enable/Disable coverage tests (GCC only) (default: OFF)
```
### Contributing ### Contributing
We are always looking for suggestions how to improve our application. If you find any bugs or have an idea for a new feature, please let us know by opening a report in our [issue tracker](https://github.com/keepassxreboot/keepassxc/issues) on GitHub or write to our [Google Groups](https://groups.google.com/forum/#!forum/keepassx-reboot) forum. We are always looking for suggestions how to improve our application. If you find any bugs or have an idea for a new feature, please let us know by opening a report in our [issue tracker](https://github.com/keepassxreboot/keepassxc/issues) on GitHub or join us on IRC on freenode channels #keepassxc or #keepassxc-dev.
You can of course also directly contribute your own code. We are happy to accept your pull requests. You can of course also directly contribute your own code. We are happy to accept your pull requests.
Please read the [CONTRIBUTING](.github/CONTRIBUTING.md) document for further information. Please read the [CONTRIBUTING document](.github/CONTRIBUTING.md) for further information.

View File

@@ -1,3 +1,17 @@
# Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 or (at your option)
# version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
find_path(GPGERROR_INCLUDE_DIR gpg-error.h) find_path(GPGERROR_INCLUDE_DIR gpg-error.h)

View File

@@ -1,9 +0,0 @@
find_path(MHD_INCLUDE_DIR microhttpd.h)
find_library(MHD_LIBRARIES microhttpd)
mark_as_advanced(MHD_LIBRARIES MHD_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibMicroHTTPD DEFAULT_MSG MHD_LIBRARIES MHD_INCLUDE_DIR)

27
cmake/FindYubiKey.cmake Normal file
View File

@@ -0,0 +1,27 @@
# Copyright (C) 2014 Kyle Manna <kyle@kylemanna.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 or (at your option)
# version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
find_path(YUBIKEY_CORE_INCLUDE_DIR yubikey.h)
find_path(YUBIKEY_PERS_INCLUDE_DIR ykcore.h PATH_SUFFIXES ykpers-1)
set(YUBIKEY_INCLUDE_DIRS ${YUBIKEY_CORE_INCLUDE_DIR} ${YUBIKEY_PERS_INCLUDE_DIR})
find_library(YUBIKEY_CORE_LIBRARY yubikey)
find_library(YUBIKEY_PERS_LIBRARY ykpers-1)
set(YUBIKEY_LIBRARIES ${YUBIKEY_CORE_LIBRARY} ${YUBIKEY_PERS_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(YubiKey DEFAULT_MSG YUBIKEY_LIBRARIES YUBIKEY_INCLUDE_DIRS)
mark_as_advanced(YUBIKEY_LIBRARIES YUBIKEY_INCLUDE_DIRS)

View File

@@ -16,8 +16,8 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
echo -e "\e[1m\e[32mKeePassXC\e[0m Release Preparation Helper" printf "\e[1m\e[32mKeePassXC\e[0m Release Preparation Helper\n"
echo -e "Copyright (C) 2017 KeePassXC Team <https://keepassxc.org/>\n" printf "Copyright (C) 2017 KeePassXC Team <https://keepassxc.org/>\n\n"
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
@@ -37,7 +37,7 @@ DOCKER_CONTAINER_NAME="keepassxc-build-container"
CMAKE_OPTIONS="" CMAKE_OPTIONS=""
COMPILER="g++" COMPILER="g++"
MAKE_OPTIONS="-j8" MAKE_OPTIONS="-j8"
BUILD_PLUGINS="autotype" BUILD_PLUGINS="autotype http yubikey"
INSTALL_PREFIX="/usr/local" INSTALL_PREFIX="/usr/local"
BUILD_SOURCE_TARBALL=true BUILD_SOURCE_TARBALL=true
ORIG_BRANCH="" ORIG_BRANCH=""
@@ -50,19 +50,20 @@ printUsage() {
local cmd local cmd
if [ "" == "$1" ] || [ "help" == "$1" ]; then if [ "" == "$1" ] || [ "help" == "$1" ]; then
cmd="COMMAND" cmd="COMMAND"
elif [ "merge" == "$1" ] || [ "build" == "$1" ] || [ "sign" == "$1" ]; then elif [ "check" == "$1" ] || [ "merge" == "$1" ] || [ "build" == "$1" ] || [ "sign" == "$1" ]; then
cmd="$1" cmd="$1"
else else
logError "Unknown command: '$1'\n" logError "Unknown command: '$1'\n"
cmd="COMMAND" cmd="COMMAND"
fi fi
echo -e "\e[1mUsage:\e[0m $(basename $0) $cmd [options]" printf "\e[1mUsage:\e[0m $(basename $0) $cmd [--version x.y.z] [options]\n"
if [ "COMMAND" == "$cmd" ]; then if [ "COMMAND" == "$cmd" ]; then
cat << EOF cat << EOF
Commands: Commands:
check Perform a dry-run check, nothing is changed
merge Merge release branch into main branch and create release tags merge Merge release branch into main branch and create release tags
build Build and package binary release from sources build Build and package binary release from sources
sign Sign previously compiled release packages sign Sign previously compiled release packages
@@ -126,15 +127,30 @@ EOF
} }
logInfo() { logInfo() {
echo -e "\e[1m[ \e[34mINFO\e[39m ]\e[0m $1" printf "\e[1m[ \e[34mINFO\e[39m ]\e[0m $1\n"
} }
logError() { logError() {
echo -e "\e[1m[ \e[31mERROR\e[39m ]\e[0m $1" >&2 printf "\e[1m[ \e[31mERROR\e[39m ]\e[0m $1\n" >&2
} }
init() { init() {
if [ "" == "$RELEASE_NAME" ]; then
logError "Missing arguments, --version is required!\n"
printUsage "check"
exit 1
fi
if [ "" == "$TAG_NAME" ]; then
TAG_NAME="$RELEASE_NAME"
fi
if [ "" == "$SOURCE_BRANCH" ]; then
SOURCE_BRANCH="release/${RELEASE_NAME}"
fi
ORIG_CWD="$(pwd)" ORIG_CWD="$(pwd)"
SRC_DIR="$(realpath "$SRC_DIR")"
cd "$SRC_DIR" > /dev/null 2>&1 cd "$SRC_DIR" > /dev/null 2>&1
ORIG_BRANCH="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)" ORIG_BRANCH="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)"
cd "$ORIG_CWD" cd "$ORIG_CWD"
@@ -214,15 +230,23 @@ checkTargetBranchExists() {
checkVersionInCMake() { checkVersionInCMake() {
local app_name_upper="$(echo "$APP_NAME" | tr '[:lower:]' '[:upper:]')" local app_name_upper="$(echo "$APP_NAME" | tr '[:lower:]' '[:upper:]')"
local major_num="$(echo ${RELEASE_NAME} | cut -f1 -d.)"
grep -q "${app_name_upper}_VERSION \"${RELEASE_NAME}\"" CMakeLists.txt local minor_num="$(echo ${RELEASE_NAME} | cut -f2 -d.)"
local patch_num="$(echo ${RELEASE_NAME} | cut -f3 -d.)"
grep -q "${app_name_upper}_VERSION_MAJOR \"${major_num}\"" CMakeLists.txt
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exitError "${app_name_upper}_VERSION version not updated to '${RELEASE_NAME}' in CMakeLists.txt!" exitError "${app_name_upper}_VERSION_MAJOR not updated to '${major_num}' in CMakeLists.txt!"
fi fi
grep -q "${app_name_upper}_VERSION_NUM \"${RELEASE_NAME}\"" CMakeLists.txt grep -q "${app_name_upper}_VERSION_MINOR \"${minor_num}\"" CMakeLists.txt
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exitError "${app_name_upper}_VERSION_NUM version not updated to '${RELEASE_NAME}' in CMakeLists.txt!" exitError "${app_name_upper}_VERSION_MINOR not updated to '${minor_num}' in CMakeLists.txt!"
fi
grep -q "${app_name_upper}_VERSION_PATCH \"${patch_num}\"" CMakeLists.txt
if [ $? -ne 0 ]; then
exitError "${app_name_upper}_VERSION_PATCH not updated to '${patch_num}' in CMakeLists.txt!"
fi fi
} }
@@ -242,11 +266,57 @@ checkTransifexCommandExists() {
if [ 0 -ne $? ]; then if [ 0 -ne $? ]; then
exitError "Transifex tool 'tx' not installed! Please install it using 'pip install transifex-client'" exitError "Transifex tool 'tx' not installed! Please install it using 'pip install transifex-client'"
fi fi
command -v lupdate-qt5 > /dev/null
if [ 0 -ne $? ]; then
exitError "Qt Linguist tool (lupdate-qt5) is not installed! Please install using 'apt install qttools5-dev-tools'"
fi
}
checkSnapcraft() {
if [ ! -f snapcraft.yaml ]; then
echo "No snapcraft file found!"
return
fi
grep -qPzo "version: ${RELEASE_NAME}" snapcraft.yaml
if [ $? -ne 0 ]; then
exitError "snapcraft.yaml has not been updated to the '${RELEASE_NAME}' release!"
fi
}
performChecks() {
logInfo "Performing basic checks..."
checkSourceDirExists
logInfo "Changing to source directory..."
cd "${SRC_DIR}"
logInfo "Validating toolset and repository..."
checkTransifexCommandExists
checkGitRepository
checkReleaseDoesNotExist
checkWorkingTreeClean
checkSourceBranchExists
checkTargetBranchExists
logInfo "Checking out '${SOURCE_BRANCH}'..."
git checkout "$SOURCE_BRANCH"
logInfo "Attempting to find '${RELEASE_NAME}' in various files..."
checkVersionInCMake
checkChangeLog
checkSnapcraft
logInfo "\e[1m\e[32mAll checks passed!\e[0m"
} }
# re-implement realpath for OS X (thanks mschrag) # re-implement realpath for OS X (thanks mschrag)
# https://superuser.com/questions/205127/ # https://superuser.com/questions/205127/
if $(command -v realpath > /dev/null); then if ! $(command -v realpath > /dev/null); then
realpath() { realpath() {
pushd . > /dev/null pushd . > /dev/null
if [ -d "$1" ]; then if [ -d "$1" ]; then
@@ -269,6 +339,28 @@ fi
trap exitTrap SIGINT SIGTERM trap exitTrap SIGINT SIGTERM
# -----------------------------------------------------------------------
# check command
# -----------------------------------------------------------------------
check() {
while [ $# -ge 1 ]; do
local arg="$1"
case "$arg" in
-v|--version)
RELEASE_NAME="$2"
shift ;;
esac
shift
done
init
performChecks
cleanup
logInfo "Congrats! You can successfully merge, build, and sign KeepassXC."
}
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# merge command # merge command
@@ -317,44 +409,9 @@ merge() {
shift shift
done done
if [ "" == "$RELEASE_NAME" ]; then
logError "Missing arguments, --version is required!\n"
printUsage "merge"
exit 1
fi
if [ "" == "$TAG_NAME" ]; then
TAG_NAME="$RELEASE_NAME"
fi
if [ "" == "$SOURCE_BRANCH" ]; then
SOURCE_BRANCH="release/${RELEASE_NAME}"
fi
init init
SRC_DIR="$(realpath "$SRC_DIR")" performChecks
logInfo "Performing basic checks..."
checkSourceDirExists
logInfo "Changing to source directory..."
cd "${SRC_DIR}"
checkTransifexCommandExists
checkGitRepository
checkReleaseDoesNotExist
checkWorkingTreeClean
checkSourceBranchExists
checkTargetBranchExists
checkVersionInCMake
checkChangeLog
logInfo "All checks pass, getting our hands dirty now!"
logInfo "Checking out source branch..."
git checkout "$SOURCE_BRANCH"
logInfo "Updating language files..." logInfo "Updating language files..."
./share/translations/update.sh ./share/translations/update.sh
@@ -372,15 +429,15 @@ merge() {
fi fi
fi fi
CHANGELOG=$(grep -Pzo "(?<=${RELEASE_NAME} \(\d{4}-\d{2}-\d{2}\)\n)=+\n\n?(?:.|\n)+?\n(?=\n)" \
CHANGELOG | grep -Pzo '(?<=\n\n)(.|\n)+' | tr -d \\0)
COMMIT_MSG="Release ${RELEASE_NAME}"
logInfo "Checking out target branch '${TARGET_BRANCH}'..." logInfo "Checking out target branch '${TARGET_BRANCH}'..."
git checkout "$TARGET_BRANCH" git checkout "$TARGET_BRANCH"
logInfo "Merging '${SOURCE_BRANCH}' into '${TARGET_BRANCH}'..." logInfo "Merging '${SOURCE_BRANCH}' into '${TARGET_BRANCH}'..."
CHANGELOG=$(grep -Pzo "(?<=${RELEASE_NAME} \(\d{4}-\d{2}-\d{2}\)\n)=+\n\n?(?:.|\n)+?\n(?=\n)" \
CHANGELOG | grep -Pzo '(?<=\n\n)(.|\n)+' | tr -d \\0)
COMMIT_MSG="Release ${RELEASE_NAME}"
git merge "$SOURCE_BRANCH" --no-ff -m "$COMMIT_MSG" -m "${CHANGELOG}" "$SOURCE_BRANCH" -S"$GPG_GIT_KEY" git merge "$SOURCE_BRANCH" --no-ff -m "$COMMIT_MSG" -m "${CHANGELOG}" "$SOURCE_BRANCH" -S"$GPG_GIT_KEY"
logInfo "Creating tag '${TAG_NAME}'..." logInfo "Creating tag '${TAG_NAME}'..."
@@ -466,36 +523,13 @@ build() {
esac esac
shift shift
done done
if [ "" == "$RELEASE_NAME" ]; then
logError "Missing arguments, --version is required!\n"
printUsage "build"
exit 1
fi
if [ "" == "$TAG_NAME" ]; then
TAG_NAME="$RELEASE_NAME"
fi
init
SRC_DIR="$(realpath "$SRC_DIR")" init
performChecks
OUTPUT_DIR="$(realpath "$OUTPUT_DIR")" OUTPUT_DIR="$(realpath "$OUTPUT_DIR")"
logInfo "Performing basic checks..."
checkSourceDirExists
logInfo "Changing to source directory..."
cd "${SRC_DIR}"
checkTagExists
checkGitRepository
checkWorkingTreeClean
checkOutputDirDoesNotExist
logInfo "All checks pass, getting our hands dirty now!"
logInfo "Checking out release tag '${TAG_NAME}'..." logInfo "Checking out release tag '${TAG_NAME}'..."
git checkout "$TAG_NAME" git checkout "$TAG_NAME"
@@ -656,7 +690,9 @@ sign() {
fi fi
logInfo "Creating digest for file '${f}'..." logInfo "Creating digest for file '${f}'..."
sha256sum "$f" > "${f}.DIGEST" local rp="$(realpath "$f")"
local bname="$(basename "$f")"
(cd "$(dirname "$rp")"; sha256sum "$bname" > "${bname}.DIGEST")
done done
logInfo "All done!" logInfo "All done!"
@@ -675,7 +711,7 @@ if [ "" == "$MODE" ]; then
elif [ "help" == "$MODE" ]; then elif [ "help" == "$MODE" ]; then
printUsage "$1" printUsage "$1"
exit exit
elif [ "merge" == "$MODE" ] || [ "build" == "$MODE" ] || [ "sign" == "$MODE" ]; then elif [ "check" == "$MODE" ] || [ "merge" == "$MODE" ] || [ "build" == "$MODE" ] || [ "sign" == "$MODE" ]; then
$MODE "$@" $MODE "$@"
else else
printUsage "$MODE" printUsage "$MODE"

View File

@@ -1,4 +1,5 @@
# Copyright (C) 2011 Felix Geyer <debfx@fobos.de> # Copyright (C) 2011 Felix Geyer <debfx@fobos.de>
# Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -15,6 +16,9 @@
add_subdirectory(translations) add_subdirectory(translations)
file(GLOB wordlists_files "wordlists/*.wordlist")
install(FILES ${wordlists_files} DESTINATION ${DATA_INSTALL_DIR}/wordlists)
file(GLOB DATABASE_ICONS icons/database/*.png) file(GLOB DATABASE_ICONS icons/database/*.png)
install(FILES ${DATABASE_ICONS} DESTINATION ${DATA_INSTALL_DIR}/icons/database) install(FILES ${DATABASE_ICONS} DESTINATION ${DATA_INSTALL_DIR}/icons/database)
@@ -22,10 +26,10 @@ install(FILES ${DATABASE_ICONS} DESTINATION ${DATA_INSTALL_DIR}/icons/database)
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
FILES_MATCHING PATTERN "keepassx*.png" PATTERN "keepassx*.svgz" FILES_MATCHING PATTERN "keepassx*.png" PATTERN "keepassx*.svgz"
PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE) PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE PATTERN "categories" EXCLUDE)
install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
FILES_MATCHING PATTERN "application-x-keepassxc.png" PATTERN "application-x-keepassxc.svgz" FILES_MATCHING PATTERN "application-x-keepassxc.png" PATTERN "application-x-keepassxc.svgz"
PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE) PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE PATTERN "categories" EXCLUDE)
install(FILES linux/keepassxc.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) install(FILES linux/keepassxc.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
install(FILES linux/keepassxc.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages) install(FILES linux/keepassxc.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
endif(UNIX AND NOT APPLE) endif(UNIX AND NOT APPLE)
@@ -86,6 +90,22 @@ add_custom_target(icons
COMMAND inkscape -z -w 256 -h 256 COMMAND inkscape -z -w 256 -h 256
icons/application/scalable/apps/keepassxc-locked.svgz -e icons/application/256x256/apps/keepassxc-locked.png icons/application/scalable/apps/keepassxc-locked.svgz -e icons/application/256x256/apps/keepassxc-locked.png
# SVGZ to PNGs for KeePassXC
COMMAND inkscape -z -w 16 -h 16
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/16x16/apps/keepassxc-unlocked.png
COMMAND inkscape -z -w 24 -h 24
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/24x24/apps/keepassxc-unlocked.png
COMMAND inkscape -z -w 32 -h 32
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/32x32/apps/keepassxc-unlocked.png
COMMAND inkscape -z -w 48 -h 48
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/48x48/apps/keepassxc-unlocked.png
COMMAND inkscape -z -w 64 -h 64
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/64x64/apps/keepassxc-unlocked.png
COMMAND inkscape -z -w 128 -h 128
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/128x128/apps/keepassxc-unlocked.png
COMMAND inkscape -z -w 256 -h 256
icons/application/scalable/apps/keepassxc-unlocked.svgz -e icons/application/256x256/apps/keepassxc-unlocked.png
# SVGZ to PNGs for KeePassXC MIME-Type # SVGZ to PNGs for KeePassXC MIME-Type
COMMAND inkscape -z -w 16 -h 16 COMMAND inkscape -z -w 16 -h 16
icons/application/scalable/mimetypes/application-x-keepassxc.svgz -e icons/application/16x16/mimetypes/application-x-keepassxc.png icons/application/scalable/mimetypes/application-x-keepassxc.svgz -e icons/application/16x16/mimetypes/application-x-keepassxc.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
viewBox="0 0 16 16"
version="1.1"
id="svg6"
sodipodi:docname="tab-close.svg"
inkscape:version="0.92.1 r">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="791"
inkscape:window-height="480"
id="namedview8"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="1301"
inkscape:window-y="443"
inkscape:window-maximized="0"
inkscape:current-layer="svg6" />
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#f2f2f2;
}
.ColorScheme-NegativeText {
color:#da4453;
}
</style>
</defs>
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
class="ColorScheme-NegativeText"
d="M 8,2 A 6,6 0 0 0 2,8 6,6 0 0 0 8,14 6,6 0 0 0 14,8 6,6 0 0 0 8,2 Z M 5.70703,5 8,7.29297 10.29297,5 11,5.70703 8.70703,8 11,10.29297 10.29297,11 8,8.70703 5.70703,11 5,10.29297 7.29297,8 5,5.70703 5.70703,5 Z"
id="path4" />
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

57
share/keepassxc.ini Normal file
View File

@@ -0,0 +1,57 @@
[General]
ShowToolbar=true
RememberLastDatabases=true
RememberLastKeyFiles=true
OpenPreviousDatabasesOnStartup=true
AutoSaveAfterEveryChange=false
AutoSaveOnExit=false
AutoReloadOnChange=true
MinimizeOnCopy=false
UseGroupIconOnEntryCreation=true
IgnoreGroupExpansion=false
AutoTypeEntryTitleMatch=true
GlobalAutoTypeKey=0
GlobalAutoTypeModifiers=0
LastOpenedDatabases=@Invalid()
[GUI]
Language=system
ShowTrayIcon=false
MinimizeToTray=false
MinimizeOnClose=false
MinimizeOnStartup=false
MainWindowGeometry="@ByteArray(\x1\xd9\xd0\xcb\0\x2\0\0\0\0\x2(\0\0\0\xbd\0\0\x5W\0\0\x3;\0\0\x2\x30\0\0\0\xdc\0\0\x5O\0\0\x3\x33\0\0\0\0\0\0\0\0\a\x80)"
SplitterState=@Invalid()
EntryListColumnSizes=@Invalid()
EntrySearchColumnSizes=@Invalid()
[security]
autotypeask=true
clearclipboard=true
clearclipboardtimeout=10
lockdatabaseidle=false
lockdatabaseidlesec=240
lockdatabaseminimize=false
lockdatabasescreenlock=true
passwordscleartext=false
passwordsrepeat=false
[Http]
Enabled=false
ShowNotification=true
BestMatchOnly=false
UnlockDatabase=true
MatchUrlScheme=true
SortByUsername=false
Port=19455
AlwaysAllowAccess=false
AlwaysAllowUpdate=false
SearchInAllDatabases=false
SupportKphFields=true
generator\LowerCase=true
generator\UpperCase=true
generator\Numbers=true
generator\SpecialChars=false
generator\ExcludeAlike=true
generator\EnsureEvery=true
generator\Length=16

View File

@@ -4,6 +4,8 @@
<dict> <dict>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
<string>NSApplication</string> <string>NSApplication</string>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>English</string> <string>English</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
@@ -27,7 +29,7 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>${KEEPASSXC_VERSION_NUM}</string> <string>${KEEPASSXC_VERSION_NUM}</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
<string>Copyright 2016 KeePassXC Development Team</string> <string>Copyright 2016-2017 KeePassXC Development Team</string>
<key>CFBundleDocumentTypes</key> <key>CFBundleDocumentTypes</key>
<array> <array>
<dict> <dict>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -14,4 +14,4 @@ tx push -s
echo echo
echo Pulling translations from Transifex echo Pulling translations from Transifex
tx pull -a --minimum-perc=80 tx pull -af --minimum-perc=40

File diff suppressed because it is too large Load Diff

View File

@@ -1,17 +1,17 @@
name: keepassxc name: keepassxc
version: 2.1.3 version: 2.2.0
grade: stable grade: stable
summary: community driven port of the windows application “Keepass Password Safe” summary: community driven port of the windows application “Keepass Password Safe”
description: | description: |
KeePassXC is an application for people with extremly high demands on secure KeePassXC is an application for people with extremely high demands on secure
personal data management. It has a light interface, is cross platform and personal data management. It has a light interface, is cross platform and
published under the terms of the GNU General Public License. is published under the terms of the GNU General Public License.
confinement: strict confinement: strict
apps: apps:
keepassxc: keepassxc:
command: desktop-launch keepassxc command: desktop-launch keepassxc
plugs: [unity7, opengl, gsettings, home, network, network-bind] plugs: [unity7, x11, opengl, gsettings, home, network, network-bind, removable-media]
parts: parts:
keepassxc: keepassxc:
@@ -22,6 +22,7 @@ parts:
- -DWITH_TESTS=OFF - -DWITH_TESTS=OFF
- -DWITH_XC_AUTOTYPE=ON - -DWITH_XC_AUTOTYPE=ON
- -DWITH_XC_HTTP=ON - -DWITH_XC_HTTP=ON
- -DWITH_XC_YUBIKEY=ON
build-packages: build-packages:
- g++ - g++
- libgcrypt20-dev - libgcrypt20-dev
@@ -30,4 +31,20 @@ parts:
- qttools5-dev - qttools5-dev
- qttools5-dev-tools - qttools5-dev-tools
- zlib1g-dev - zlib1g-dev
- libxi-dev
- libxtst-dev
- libyubikey-dev
- libykpers-1-dev
after: [desktop-qt5] after: [desktop-qt5]
desktop-qt5:
# Redefine stage packages to work with Ubuntu 17.04
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
- libqt5svg5 # for loading icon themes which are svg
- locales-all

View File

@@ -1,4 +1,5 @@
# Copyright (C) 2010 Felix Geyer <debfx@fobos.de> # Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
# Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -31,6 +32,7 @@ configure_file(version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)
set(keepassx_SOURCES set(keepassx_SOURCES
core/AutoTypeAssociations.cpp core/AutoTypeAssociations.cpp
core/Config.cpp core/Config.cpp
core/CsvParser.cpp
core/Database.cpp core/Database.cpp
core/DatabaseIcons.cpp core/DatabaseIcons.cpp
core/Endian.cpp core/Endian.cpp
@@ -45,13 +47,20 @@ set(keepassx_SOURCES
core/ListDeleter.h core/ListDeleter.h
core/Metadata.cpp core/Metadata.cpp
core/PasswordGenerator.cpp core/PasswordGenerator.cpp
core/PassphraseGenerator.cpp
core/SignalMultiplexer.cpp core/SignalMultiplexer.cpp
core/ScreenLockListener.cpp
core/ScreenLockListener.h
core/ScreenLockListenerPrivate.h
core/ScreenLockListenerPrivate.cpp
core/TimeDelta.cpp core/TimeDelta.cpp
core/TimeInfo.cpp core/TimeInfo.cpp
core/ToDbExporter.cpp core/ToDbExporter.cpp
core/Tools.cpp core/Tools.cpp
core/Translator.cpp core/Translator.cpp
core/Uuid.cpp core/Uuid.cpp
cli/PasswordInput.cpp
cli/PasswordInput.h
crypto/Crypto.cpp crypto/Crypto.cpp
crypto/CryptoHash.cpp crypto/CryptoHash.cpp
crypto/Random.cpp crypto/Random.cpp
@@ -70,8 +79,10 @@ set(keepassx_SOURCES
format/KeePass2XmlWriter.cpp format/KeePass2XmlWriter.cpp
gui/AboutDialog.cpp gui/AboutDialog.cpp
gui/Application.cpp gui/Application.cpp
gui/CategoryListWidget.cpp
gui/ChangeMasterKeyWidget.cpp gui/ChangeMasterKeyWidget.cpp
gui/Clipboard.cpp gui/Clipboard.cpp
gui/CloneDialog.cpp
gui/DatabaseOpenWidget.cpp gui/DatabaseOpenWidget.cpp
gui/DatabaseRepairWidget.cpp gui/DatabaseRepairWidget.cpp
gui/DatabaseSettingsWidget.cpp gui/DatabaseSettingsWidget.cpp
@@ -86,18 +97,24 @@ set(keepassx_SOURCES
gui/FileDialog.cpp gui/FileDialog.cpp
gui/IconModels.cpp gui/IconModels.cpp
gui/KeePass1OpenWidget.cpp gui/KeePass1OpenWidget.cpp
gui/KMessageWidget.cpp
gui/LineEdit.cpp gui/LineEdit.cpp
gui/MainWindow.cpp gui/MainWindow.cpp
gui/MessageBox.cpp gui/MessageBox.cpp
gui/MessageWidget.cpp
gui/PasswordEdit.cpp gui/PasswordEdit.cpp
gui/PasswordGeneratorWidget.cpp gui/PasswordGeneratorWidget.cpp
gui/PasswordComboBox.cpp
gui/SettingsWidget.cpp gui/SettingsWidget.cpp
gui/SearchWidget.cpp gui/SearchWidget.cpp
gui/SortFilterHideProxyModel.cpp gui/SortFilterHideProxyModel.cpp
gui/SetupTotpDialog.cpp
gui/TotpDialog.cpp
gui/UnlockDatabaseWidget.cpp gui/UnlockDatabaseWidget.cpp
gui/UnlockDatabaseDialog.cpp gui/UnlockDatabaseDialog.cpp
gui/WelcomeWidget.cpp gui/WelcomeWidget.cpp
gui/csvImport/CsvImportWidget.cpp
gui/csvImport/CsvImportWizard.cpp
gui/csvImport/CsvParserModel.cpp
gui/entry/AutoTypeAssociationsModel.cpp gui/entry/AutoTypeAssociationsModel.cpp
gui/entry/EditEntryWidget.cpp gui/entry/EditEntryWidget.cpp
gui/entry/EditEntryWidget_p.h gui/entry/EditEntryWidget_p.h
@@ -111,50 +128,55 @@ set(keepassx_SOURCES
gui/group/GroupView.cpp gui/group/GroupView.cpp
keys/CompositeKey.cpp keys/CompositeKey.cpp
keys/CompositeKey_p.h keys/CompositeKey_p.h
keys/drivers/YubiKey.h
keys/FileKey.cpp keys/FileKey.cpp
keys/Key.h keys/Key.h
keys/PasswordKey.cpp keys/PasswordKey.cpp
keys/YkChallengeResponseKey.cpp
streams/HashedBlockStream.cpp streams/HashedBlockStream.cpp
streams/LayeredStream.cpp streams/LayeredStream.cpp
streams/qtiocompressor.cpp streams/qtiocompressor.cpp
streams/StoreDataStream.cpp streams/StoreDataStream.cpp
streams/SymmetricCipherStream.cpp streams/SymmetricCipherStream.cpp
totp/base32.h
totp/base32.cpp
totp/totp.h
totp/totp.cpp
) )
if(APPLE)
set(keepassx_SOURCES ${keepassx_SOURCES}
core/ScreenLockListenerMac.h
core/ScreenLockListenerMac.cpp
)
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(keepassx_SOURCES ${keepassx_SOURCES}
core/ScreenLockListenerDBus.h
core/ScreenLockListenerDBus.cpp
)
endif()
if(MINGW)
set(keepassx_SOURCES ${keepassx_SOURCES}
core/ScreenLockListenerWin.h
core/ScreenLockListenerWin.cpp
)
endif()
set(keepassx_SOURCES_MAINEXE set(keepassx_SOURCES_MAINEXE
main.cpp main.cpp
) )
set(keepassx_FORMS add_feature_info(AutoType WITH_XC_AUTOTYPE "Automatic password typing")
gui/AboutDialog.ui add_feature_info(KeePassHTTP WITH_XC_HTTP "Browser integration compatible with ChromeIPass and PassIFox")
gui/ChangeMasterKeyWidget.ui add_feature_info(YubiKey WITH_XC_YUBIKEY "YubiKey HMAC-SHA1 challenge-response")
gui/DatabaseOpenWidget.ui
gui/DatabaseSettingsWidget.ui
gui/EditWidget.ui
gui/EditWidgetIcons.ui
gui/EditWidgetProperties.ui
gui/MainWindow.ui
gui/PasswordGeneratorWidget.ui
gui/SearchWidget.ui
gui/SettingsWidgetGeneral.ui
gui/SettingsWidgetSecurity.ui
gui/WelcomeWidget.ui
gui/entry/EditEntryWidgetAdvanced.ui
gui/entry/EditEntryWidgetAutoType.ui
gui/entry/EditEntryWidgetHistory.ui
gui/entry/EditEntryWidgetMain.ui
gui/group/EditGroupWidgetMain.ui
)
add_feature_info(KeePassHTTP WITH_XC_HTTP "KeePassHTTP support for ChromeIPass and PassIFox")
add_feature_info(Autotype WITH_XC_AUTOTYPE "Auto-type passwords in Input fields")
add_subdirectory(http) add_subdirectory(http)
if(WITH_XC_HTTP) if(WITH_XC_HTTP)
set(keepasshttp_LIB keepasshttp) set(keepasshttp_LIB keepasshttp qhttp Qt5::Network)
endif() endif()
add_subdirectory(autotype) add_subdirectory(autotype)
add_subdirectory(cli)
set(autotype_SOURCES set(autotype_SOURCES
core/Tools.cpp core/Tools.cpp
@@ -175,7 +197,11 @@ if(MINGW)
${CMAKE_SOURCE_DIR}/share/windows/icon.rc) ${CMAKE_SOURCE_DIR}/share/windows/icon.rc)
endif() endif()
qt5_wrap_ui(keepassx_SOURCES ${keepassx_FORMS}) if(WITH_XC_YUBIKEY)
list(APPEND keepassx_SOURCES keys/drivers/YubiKey.cpp)
else()
list(APPEND keepassx_SOURCES keys/drivers/YubiKeyStub.cpp)
endif()
add_library(zxcvbn STATIC zxcvbn/zxcvbn.cpp) add_library(zxcvbn STATIC zxcvbn/zxcvbn.cpp)
target_link_libraries(zxcvbn) target_link_libraries(zxcvbn)
@@ -191,25 +217,27 @@ set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUIL
target_link_libraries(keepassx_core target_link_libraries(keepassx_core
${keepasshttp_LIB} ${keepasshttp_LIB}
${autotype_LIB} ${autotype_LIB}
${YUBIKEY_LIBRARIES}
zxcvbn zxcvbn
qhttp
Qt5::Core Qt5::Core
Qt5::Network
Qt5::Concurrent Qt5::Concurrent
Qt5::Widgets Qt5::Widgets
Qt5::Network
${GCRYPT_LIBRARIES} ${GCRYPT_LIBRARIES}
${GPGERROR_LIBRARIES} ${GPGERROR_LIBRARIES}
${ZLIB_LIBRARIES}) ${ZLIB_LIBRARIES})
if(APPLE)
target_link_libraries(keepassx_core "-framework Foundation")
endif()
if (UNIX AND NOT APPLE) if (UNIX AND NOT APPLE)
target_link_libraries(keepassx_core Qt5::DBus) target_link_libraries(keepassx_core Qt5::DBus)
endif() endif()
if(MINGW)
target_link_libraries(keepassx_core Wtsapi32.lib)
endif()
if(MINGW) if(MINGW)
string(REPLACE "." ";" VERSION_LIST ${KEEPASSXC_VERSION})
list(GET VERSION_LIST 0 KEEPASSXC_VERSION_MAJOR)
list(GET VERSION_LIST 1 KEEPASSXC_VERSION_MINOR)
list(GET VERSION_LIST 2 KEEPASSXC_VERSION_PATCH)
include(GenerateProductVersion) include(GenerateProductVersion)
generate_product_version( generate_product_version(
WIN32_ProductVersionFiles WIN32_ProductVersionFiles
@@ -221,14 +249,15 @@ if(MINGW)
) )
endif() endif()
add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE} ${WIN32_ProductVersionFiles}) add_executable(${PROGNAME} WIN32 ${keepassx_SOURCES_MAINEXE} ${WIN32_ProductVersionFiles})
target_link_libraries(${PROGNAME} keepassx_core) target_link_libraries(${PROGNAME} keepassx_core)
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON) set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
if(APPLE) if(APPLE AND WITH_APP_BUNDLE)
configure_file(${CMAKE_SOURCE_DIR}/share/macosx/Info.plist.cmake ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) configure_file(${CMAKE_SOURCE_DIR}/share/macosx/Info.plist.cmake ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
set_target_properties(${PROGNAME} PROPERTIES set_target_properties(${PROGNAME} PROPERTIES
MACOSX_BUNDLE ON
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
endif() endif()
@@ -236,7 +265,7 @@ install(TARGETS ${PROGNAME}
BUNDLE DESTINATION . COMPONENT Runtime BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT Runtime) RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT Runtime)
if(APPLE) if(APPLE AND WITH_APP_BUNDLE)
if(QT_MAC_USE_COCOA AND EXISTS "${QT_LIBRARY_DIR}/Resources/qt_menu.nib") if(QT_MAC_USE_COCOA AND EXISTS "${QT_LIBRARY_DIR}/Resources/qt_menu.nib")
install(DIRECTORY "${QT_LIBRARY_DIR}/Resources/qt_menu.nib" install(DIRECTORY "${QT_LIBRARY_DIR}/Resources/qt_menu.nib"
DESTINATION "${DATA_INSTALL_DIR}") DESTINATION "${DATA_INSTALL_DIR}")
@@ -247,7 +276,7 @@ if(APPLE)
set(CPACK_DMG_VOLUME_NAME "${PROGNAME}") set(CPACK_DMG_VOLUME_NAME "${PROGNAME}")
set(CPACK_SYSTEM_NAME "OSX") set(CPACK_SYSTEM_NAME "OSX")
set(CPACK_STRIP_FILES ON) set(CPACK_STRIP_FILES ON)
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION_NUM}") set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}")
include(CPack) include(CPack)
if(NOT DEFINED QT_BINARY_DIR) if(NOT DEFINED QT_BINARY_DIR)
@@ -261,7 +290,12 @@ if(APPLE)
endif() endif()
if(MINGW) if(MINGW)
string(REPLACE "AMD" "Win" OUTPUT_FILE_POSTFIX "${CMAKE_HOST_SYSTEM_PROCESSOR}") if(${CMAKE_SIZEOF_VOID_P} EQUAL "8")
set(OUTPUT_FILE_POSTFIX "Win64")
else()
set(OUTPUT_FILE_POSTFIX "Win32")
endif()
set(CPACK_GENERATOR "ZIP;NSIS") set(CPACK_GENERATOR "ZIP;NSIS")
set(CPACK_STRIP_FILES ON) set(CPACK_STRIP_FILES ON)
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${OUTPUT_FILE_POSTFIX}") set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${OUTPUT_FILE_POSTFIX}")
@@ -270,6 +304,7 @@ if(MINGW)
set(CPACK_PACKAGE_VENDOR "${PROGNAME} Team") set(CPACK_PACKAGE_VENDOR "${PROGNAME} Team")
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/share/windows/installer-header.bmp") string(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/share/windows/installer-header.bmp")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.GPL-2") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.GPL-2")
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/share/windows/keepassxc.ico") set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/share/windows/keepassxc.ico")
set(CPACK_NSIS_MUI_UNIICON "${CPACK_NSIS_MUI_ICON}") set(CPACK_NSIS_MUI_UNIICON "${CPACK_NSIS_MUI_ICON}")
set(CPACK_NSIS_INSTALLED_ICON_NAME "\\\\${PROGNAME}.exe") set(CPACK_NSIS_INSTALLED_ICON_NAME "\\\\${PROGNAME}.exe")
@@ -278,6 +313,7 @@ if(MINGW)
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${PROGNAME}.lnk' '$INSTDIR\\\\${PROGNAME}.exe'") set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${PROGNAME}.lnk' '$INSTDIR\\\\${PROGNAME}.exe'")
set(CPACK_NSIS_DELETE_ICONS_EXTRA "Delete '$SMPROGRAMS\\\\$START_MENU\\\\${PROGNAME}.lnk'") set(CPACK_NSIS_DELETE_ICONS_EXTRA "Delete '$SMPROGRAMS\\\\$START_MENU\\\\${PROGNAME}.lnk'")
set(CPACK_NSIS_URL_INFO_ABOUT "https://keepassxc.org") set(CPACK_NSIS_URL_INFO_ABOUT "https://keepassxc.org")
set(CPACK_NSIS_DISPLAY_NAME ${PROGNAME})
set(CPACK_NSIS_PACKAGE_NAME "${PROGNAME} v${KEEPASSXC_VERSION}") set(CPACK_NSIS_PACKAGE_NAME "${PROGNAME} v${KEEPASSXC_VERSION}")
set(CPACK_NSIS_MUI_FINISHPAGE_RUN "../${PROGNAME}.exe") set(CPACK_NSIS_MUI_FINISHPAGE_RUN "../${PROGNAME}.exe")
include(CPack) include(CPack)

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de> * Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -142,6 +143,9 @@ void AutoType::performAutoType(const Entry* entry, QWidget* hideWindow, const QS
sequence = customSequence; sequence = customSequence;
} }
sequence.replace("{{}", "{LEFTBRACE}");
sequence.replace("{}}", "{RIGHTBRACE}");
QList<AutoTypeAction*> actions; QList<AutoTypeAction*> actions;
ListDeleter<AutoTypeAction*> actionsDeleter(&actions); ListDeleter<AutoTypeAction*> actionsDeleter(&actions);
@@ -317,8 +321,6 @@ bool AutoType::parseActions(const QString& sequence, const Entry* entry, QList<A
for (const QChar& ch : sequence) { for (const QChar& ch : sequence) {
// TODO: implement support for {{}, {}}
if (inTmpl) { if (inTmpl) {
if (ch == '{') { if (ch == '{') {
qWarning("Syntax error in auto-type sequence."); qWarning("Syntax error in auto-type sequence.");
@@ -396,6 +398,9 @@ QList<AutoTypeAction*> AutoType::createActionFromTemplate(const QString& tmpl, c
else if (tmplName.compare("enter",Qt::CaseInsensitive)==0) { else if (tmplName.compare("enter",Qt::CaseInsensitive)==0) {
list.append(new AutoTypeKey(Qt::Key_Enter)); list.append(new AutoTypeKey(Qt::Key_Enter));
} }
else if (tmplName.compare("space",Qt::CaseInsensitive)==0) {
list.append(new AutoTypeKey(Qt::Key_Space));
}
else if (tmplName.compare("up",Qt::CaseInsensitive)==0) { else if (tmplName.compare("up",Qt::CaseInsensitive)==0) {
list.append(new AutoTypeKey(Qt::Key_Up)); list.append(new AutoTypeKey(Qt::Key_Up));
} }
@@ -483,10 +488,10 @@ QList<AutoTypeAction*> AutoType::createActionFromTemplate(const QString& tmpl, c
else if (tmplName.compare(")",Qt::CaseInsensitive)==0) { else if (tmplName.compare(")",Qt::CaseInsensitive)==0) {
list.append(new AutoTypeChar(')')); list.append(new AutoTypeChar(')'));
} }
else if (tmplName.compare("{",Qt::CaseInsensitive)==0) { else if (tmplName.compare("leftbrace",Qt::CaseInsensitive)==0) {
list.append(new AutoTypeChar('{')); list.append(new AutoTypeChar('{'));
} }
else if (tmplName.compare("}",Qt::CaseInsensitive)==0) { else if (tmplName.compare("rightbrace",Qt::CaseInsensitive)==0) {
list.append(new AutoTypeChar('}')); list.append(new AutoTypeChar('}'));
} }
else { else {
@@ -514,6 +519,14 @@ QList<AutoTypeAction*> AutoType::createActionFromTemplate(const QString& tmpl, c
else if (tmplName.compare("clearfield",Qt::CaseInsensitive)==0) { else if (tmplName.compare("clearfield",Qt::CaseInsensitive)==0) {
list.append(new AutoTypeClearField()); list.append(new AutoTypeClearField());
} }
else if (tmplName.compare("totp", Qt::CaseInsensitive) == 0) {
QString totp = entry->totp();
if (!totp.isEmpty()) {
for (const QChar& ch : totp) {
list.append(new AutoTypeChar(ch));
}
}
}
if (!list.isEmpty()) { if (!list.isEmpty()) {
return list; return list;
@@ -562,8 +575,9 @@ QString AutoType::autoTypeSequence(const Entry* entry, const QString& windowTitl
} }
} }
if (!match && config()->get("AutoTypeEntryTitleMatch").toBool() && !entry->title().isEmpty() if (!match && config()->get("AutoTypeEntryTitleMatch").toBool()
&& windowTitle.contains(entry->title(), Qt::CaseInsensitive)) { && (windowMatchesTitle(windowTitle, entry->resolvePlaceholder(entry->title()))
|| windowMatchesUrl(windowTitle, entry->resolvePlaceholder(entry->url())))) {
sequence = entry->defaultAutoTypeSequence(); sequence = entry->defaultAutoTypeSequence();
match = true; match = true;
} }
@@ -594,11 +608,11 @@ QString AutoType::autoTypeSequence(const Entry* entry, const QString& windowTitl
group = group->parentGroup(); group = group->parentGroup();
} while (group && (!enableSet || sequence.isEmpty())); } while (group && (!enableSet || sequence.isEmpty()));
if (sequence.isEmpty() && (!entry->username().isEmpty() || !entry->password().isEmpty())) { if (sequence.isEmpty() && (!entry->resolvePlaceholder(entry->username()).isEmpty() || !entry->resolvePlaceholder(entry->password()).isEmpty())) {
if (entry->username().isEmpty()) { if (entry->resolvePlaceholder(entry->username()).isEmpty()) {
sequence = "{PASSWORD}{ENTER}"; sequence = "{PASSWORD}{ENTER}";
} }
else if (entry->password().isEmpty()) { else if (entry->resolvePlaceholder(entry->password()).isEmpty()) {
sequence = "{USERNAME}{ENTER}"; sequence = "{USERNAME}{ENTER}";
} }
else { else {
@@ -619,3 +633,22 @@ bool AutoType::windowMatches(const QString& windowTitle, const QString& windowPa
return WildcardMatcher(windowTitle).match(windowPattern); return WildcardMatcher(windowTitle).match(windowPattern);
} }
} }
bool AutoType::windowMatchesTitle(const QString& windowTitle, const QString& resolvedTitle)
{
return !resolvedTitle.isEmpty() && windowTitle.contains(resolvedTitle, Qt::CaseInsensitive);
}
bool AutoType::windowMatchesUrl(const QString& windowTitle, const QString& resolvedUrl)
{
if (!resolvedUrl.isEmpty() && windowTitle.contains(resolvedUrl, Qt::CaseInsensitive)) {
return true;
}
QUrl url(resolvedUrl);
if (url.isValid() && !url.host().isEmpty()) {
return windowTitle.contains(url.host(), Qt::CaseInsensitive);
}
return false;
}

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de> * Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -48,13 +49,13 @@ public:
static AutoType* instance(); static AutoType* instance();
static void createTestInstance(); static void createTestInstance();
public Q_SLOTS: public slots:
void performGlobalAutoType(const QList<Database*>& dbList); void performGlobalAutoType(const QList<Database*>& dbList);
Q_SIGNALS: signals:
void globalShortcutTriggered(); void globalShortcutTriggered();
private Q_SLOTS: private slots:
void performAutoTypeFromGlobal(Entry* entry, const QString& sequence); void performAutoTypeFromGlobal(Entry* entry, const QString& sequence);
void resetInAutoType(); void resetInAutoType();
void unloadPlugin(); void unloadPlugin();
@@ -66,6 +67,8 @@ private:
bool parseActions(const QString& sequence, const Entry* entry, QList<AutoTypeAction*>& actions); bool parseActions(const QString& sequence, const Entry* entry, QList<AutoTypeAction*>& actions);
QList<AutoTypeAction*> createActionFromTemplate(const QString& tmpl, const Entry* entry); QList<AutoTypeAction*> createActionFromTemplate(const QString& tmpl, const Entry* entry);
QString autoTypeSequence(const Entry* entry, const QString& windowTitle = QString()); QString autoTypeSequence(const Entry* entry, const QString& windowTitle = QString());
bool windowMatchesTitle(const QString& windowTitle, const QString& resolvedTitle);
bool windowMatchesUrl(const QString& windowTitle, const QString& resolvedUrl);
bool windowMatches(const QString& windowTitle, const QString& windowPattern); bool windowMatches(const QString& windowTitle, const QString& windowPattern);
bool m_inAutoType; bool m_inAutoType;

View File

@@ -90,6 +90,4 @@ void AutoTypeExecutor::execDelay(AutoTypeDelay* action)
void AutoTypeExecutor::execClearField(AutoTypeClearField* action) void AutoTypeExecutor::execClearField(AutoTypeClearField* action)
{ {
Q_UNUSED(action); Q_UNUSED(action);
// TODO: implement
} }

View File

@@ -91,7 +91,7 @@ void AutoTypeSelectDialog::emitEntryActivated(const QModelIndex& index)
Entry* entry = m_view->entryFromIndex(index); Entry* entry = m_view->entryFromIndex(index);
accept(); accept();
Q_EMIT entryActivated(entry, m_sequences[entry]); emit entryActivated(entry, m_sequences[entry]);
} }
void AutoTypeSelectDialog::entryRemoved() void AutoTypeSelectDialog::entryRemoved()

View File

@@ -33,13 +33,13 @@ public:
explicit AutoTypeSelectDialog(QWidget* parent = nullptr); explicit AutoTypeSelectDialog(QWidget* parent = nullptr);
void setEntries(const QList<Entry*>& entries, const QHash<Entry*, QString>& sequences); void setEntries(const QList<Entry*>& entries, const QHash<Entry*, QString>& sequences);
Q_SIGNALS: signals:
void entryActivated(Entry* entry, const QString& sequence); void entryActivated(Entry* entry, const QString& sequence);
public Q_SLOTS: public slots:
void done(int r) override; void done(int r) override;
private Q_SLOTS: private slots:
void emitEntryActivated(const QModelIndex& index); void emitEntryActivated(const QModelIndex& index);
void entryRemoved(); void entryRemoved();

View File

@@ -32,7 +32,7 @@ public:
protected: protected:
void mouseMoveEvent(QMouseEvent* event) override; void mouseMoveEvent(QMouseEvent* event) override;
private Q_SLOTS: private slots:
void selectFirstEntry(); void selectFirstEntry();
}; };

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de> * Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de> * Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de> * Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de> * Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -120,7 +121,7 @@ bool AutoTypePlatformMac::registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifi
qWarning("Invalid key code"); qWarning("Invalid key code");
return false; return false;
} }
uint16 nativeModifiers = qtToNativeModifiers(modifiers); CGEventFlags nativeModifiers = qtToNativeModifiers(modifiers, false);
if (::RegisterEventHotKey(nativeKeyCode, nativeModifiers, m_hotkeyId, GetApplicationEventTarget(), 0, &m_hotkeyRef) != noErr) { if (::RegisterEventHotKey(nativeKeyCode, nativeModifiers, m_hotkeyId, GetApplicationEventTarget(), 0, &m_hotkeyRef) != noErr) {
qWarning("Register hotkey failed"); qWarning("Register hotkey failed");
return false; return false;
@@ -201,7 +202,7 @@ void AutoTypePlatformMac::sendChar(const QChar& ch, bool isKeyDown)
// Send key code to active window // Send key code to active window
// see: Quartz Event Services // see: Quartz Event Services
// //
void AutoTypePlatformMac::sendKey(Qt::Key key, bool isKeyDown) void AutoTypePlatformMac::sendKey(Qt::Key key, bool isKeyDown, Qt::KeyboardModifiers modifiers = 0)
{ {
uint16 keyCode = qtToNativeKeyCode(key); uint16 keyCode = qtToNativeKeyCode(key);
if (keyCode == INVALID_KEYCODE) { if (keyCode == INVALID_KEYCODE) {
@@ -209,7 +210,9 @@ void AutoTypePlatformMac::sendKey(Qt::Key key, bool isKeyDown)
} }
CGEventRef keyEvent = ::CGEventCreateKeyboardEvent(nullptr, keyCode, isKeyDown); CGEventRef keyEvent = ::CGEventCreateKeyboardEvent(nullptr, keyCode, isKeyDown);
CGEventFlags nativeModifiers = qtToNativeModifiers(modifiers, true);
if (keyEvent != nullptr) { if (keyEvent != nullptr) {
::CGEventSetFlags(keyEvent, nativeModifiers);
::CGEventPost(kCGSessionEventTap, keyEvent); ::CGEventPost(kCGSessionEventTap, keyEvent);
::CFRelease(keyEvent); ::CFRelease(keyEvent);
} }
@@ -317,6 +320,10 @@ uint16 AutoTypePlatformMac::qtToNativeKeyCode(Qt::Key key)
case Qt::Key_Period: case Qt::Key_Period:
return kVK_ANSI_Period; return kVK_ANSI_Period;
case Qt::Key_Shift:
return kVK_Shift;
case Qt::Key_Control:
return kVK_Command;
case Qt::Key_Backspace: case Qt::Key_Backspace:
return kVK_Delete; return kVK_Delete;
case Qt::Key_Tab: case Qt::Key_Tab:
@@ -395,21 +402,34 @@ uint16 AutoTypePlatformMac::qtToNativeKeyCode(Qt::Key key)
// Translate qt key modifiers to mac os modifiers // Translate qt key modifiers to mac os modifiers
// see: https://doc.qt.io/qt-5/osx-issues.html#special-keys // see: https://doc.qt.io/qt-5/osx-issues.html#special-keys
// //
uint16 AutoTypePlatformMac::qtToNativeModifiers(Qt::KeyboardModifiers modifiers) CGEventFlags AutoTypePlatformMac::qtToNativeModifiers(Qt::KeyboardModifiers modifiers, bool native)
{ {
uint16 nativeModifiers = 0; CGEventFlags nativeModifiers = CGEventFlags(0);
CGEventFlags shiftMod = CGEventFlags(shiftKey);
CGEventFlags cmdMod = CGEventFlags(cmdKey);
CGEventFlags optionMod = CGEventFlags(optionKey);
CGEventFlags controlMod = CGEventFlags(controlKey);
if (native) {
shiftMod = kCGEventFlagMaskShift;
cmdMod = kCGEventFlagMaskCommand;
optionMod = kCGEventFlagMaskAlternate;
controlMod = kCGEventFlagMaskControl;
}
if (modifiers & Qt::ShiftModifier) { if (modifiers & Qt::ShiftModifier) {
nativeModifiers |= shiftKey; nativeModifiers = CGEventFlags(nativeModifiers | shiftMod);
} }
if (modifiers & Qt::ControlModifier) { if (modifiers & Qt::ControlModifier) {
nativeModifiers |= cmdKey; nativeModifiers = CGEventFlags(nativeModifiers | cmdMod);
} }
if (modifiers & Qt::AltModifier) { if (modifiers & Qt::AltModifier) {
nativeModifiers |= optionKey; nativeModifiers = CGEventFlags(nativeModifiers | optionMod);
} }
if (modifiers & Qt::MetaModifier) { if (modifiers & Qt::MetaModifier) {
nativeModifiers |= controlKey; nativeModifiers = CGEventFlags(nativeModifiers | controlMod);
} }
return nativeModifiers; return nativeModifiers;
@@ -460,7 +480,7 @@ OSStatus AutoTypePlatformMac::hotkeyHandler(EventHandlerCallRef nextHandler, Eve
if (::GetEventParameter(theEvent, kEventParamDirectObject, typeEventHotKeyID, nullptr, sizeof(hotkeyId), nullptr, &hotkeyId) == noErr if (::GetEventParameter(theEvent, kEventParamDirectObject, typeEventHotKeyID, nullptr, sizeof(hotkeyId), nullptr, &hotkeyId) == noErr
&& hotkeyId.id == HOTKEY_ID) { && hotkeyId.id == HOTKEY_ID) {
Q_EMIT self->globalShortcutTriggered(); emit self->globalShortcutTriggered();
} }
return noErr; return noErr;
@@ -488,3 +508,25 @@ void AutoTypeExecutorMac::execKey(AutoTypeKey* action)
m_platform->sendKey(action->key, false); m_platform->sendKey(action->key, false);
usleep(25 * 1000); usleep(25 * 1000);
} }
void AutoTypeExecutorMac::execClearField(AutoTypeClearField* action = nullptr)
{
Q_UNUSED(action);
m_platform->sendKey(Qt::Key_Control, true, Qt::ControlModifier);
m_platform->sendKey(Qt::Key_Up, true, Qt::ControlModifier);
m_platform->sendKey(Qt::Key_Up, false, Qt::ControlModifier);
m_platform->sendKey(Qt::Key_Control, false);
usleep(25 * 1000);
m_platform->sendKey(Qt::Key_Shift, true, Qt::ShiftModifier);
m_platform->sendKey(Qt::Key_Control, true, Qt::ShiftModifier | Qt::ControlModifier);
m_platform->sendKey(Qt::Key_Down, true, Qt::ShiftModifier | Qt::ControlModifier);
m_platform->sendKey(Qt::Key_Down, false, Qt::ShiftModifier | Qt::ControlModifier);
m_platform->sendKey(Qt::Key_Control, false, Qt::ShiftModifier);
m_platform->sendKey(Qt::Key_Shift, false);
usleep(25 * 1000);
m_platform->sendKey(Qt::Key_Backspace, true);
m_platform->sendKey(Qt::Key_Backspace, false);
usleep(25 * 1000);
}

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de> * Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -49,9 +50,9 @@ public:
bool raiseOwnWindow() override; bool raiseOwnWindow() override;
void sendChar(const QChar& ch, bool isKeyDown); void sendChar(const QChar& ch, bool isKeyDown);
void sendKey(Qt::Key key, bool isKeyDown); void sendKey(Qt::Key key, bool isKeyDown, Qt::KeyboardModifiers modifiers);
Q_SIGNALS: signals:
void globalShortcutTriggered(); void globalShortcutTriggered();
private: private:
@@ -60,7 +61,7 @@ private:
EventHotKeyID m_hotkeyId; EventHotKeyID m_hotkeyId;
static uint16 qtToNativeKeyCode(Qt::Key key); static uint16 qtToNativeKeyCode(Qt::Key key);
static uint16 qtToNativeModifiers(Qt::KeyboardModifiers modifiers); static CGEventFlags qtToNativeModifiers(Qt::KeyboardModifiers modifiers, bool native);
static int windowLayer(CFDictionaryRef window); static int windowLayer(CFDictionaryRef window);
static QString windowTitle(CFDictionaryRef window); static QString windowTitle(CFDictionaryRef window);
static OSStatus hotkeyHandler(EventHandlerCallRef nextHandler, EventRef theEvent, void *userData); static OSStatus hotkeyHandler(EventHandlerCallRef nextHandler, EventRef theEvent, void *userData);
@@ -73,6 +74,7 @@ public:
void execChar(AutoTypeChar* action) override; void execChar(AutoTypeChar* action) override;
void execKey(AutoTypeKey* action) override; void execKey(AutoTypeKey* action) override;
void execClearField(AutoTypeClearField* action) override;
private: private:
AutoTypePlatformMac* const m_platform; AutoTypePlatformMac* const m_platform;

View File

@@ -12,9 +12,15 @@ target_link_libraries(keepassx-autotype-cocoa ${PROGNAME} Qt5::Core Qt5::Widgets
if(NOT DEFINED QT_BINARY_DIR) if(NOT DEFINED QT_BINARY_DIR)
set(QT_BINARY_DIR "/usr/local/opt/qt5/bin" CACHE PATH "QT binary folder") set(QT_BINARY_DIR "/usr/local/opt/qt5/bin" CACHE PATH "QT binary folder")
endif() endif()
add_custom_command(TARGET keepassx-autotype-cocoa if(WITH_APP_BUNDLE)
POST_BUILD add_custom_command(TARGET keepassx-autotype-cocoa
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libkeepassx-autotype-cocoa.so ${PLUGIN_INSTALL_DIR} POST_BUILD
COMMAND ${QT_BINARY_DIR}/macdeployqt ${PROGNAME}.app -executable=${PLUGIN_INSTALL_DIR}/libkeepassx-autotype-cocoa.so -no-plugins COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libkeepassx-autotype-cocoa.so ${PLUGIN_INSTALL_DIR}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src COMMAND ${QT_BINARY_DIR}/macdeployqt ${PROGNAME}.app -executable=${PLUGIN_INSTALL_DIR}/libkeepassx-autotype-cocoa.so -no-plugins
COMMENT "Deploying autotype plugin") WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
COMMENT "Deploying autotype plugin")
else()
install(TARGETS keepassx-autotype-cocoa
BUNDLE DESTINATION . COMPONENT Runtime
LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} COMPONENT Runtime)
endif()

View File

@@ -60,7 +60,7 @@ public:
void addActionChar(AutoTypeChar* action); void addActionChar(AutoTypeChar* action);
void addActionKey(AutoTypeKey* action); void addActionKey(AutoTypeKey* action);
Q_SIGNALS: signals:
void globalShortcutTriggered(); void globalShortcutTriggered();
private: private:

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de> * Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -96,7 +97,7 @@ int AutoTypePlatformWin::platformEventFilter(void* event)
MSG *msg = static_cast<MSG *>(event); MSG *msg = static_cast<MSG *>(event);
if (msg->message == WM_HOTKEY && msg->wParam == HOTKEY_ID) { if (msg->message == WM_HOTKEY && msg->wParam == HOTKEY_ID) {
Q_EMIT globalShortcutTriggered(); emit globalShortcutTriggered();
return 1; return 1;
} }
@@ -189,6 +190,10 @@ DWORD AutoTypePlatformWin::qtToNativeKeyCode(Qt::Key key)
case Qt::Key_Enter: case Qt::Key_Enter:
case Qt::Key_Return: case Qt::Key_Return:
return VK_RETURN; // 0x0D return VK_RETURN; // 0x0D
case Qt::Key_Shift:
return VK_SHIFT; // 0x10
case Qt::Key_Control:
return VK_CONTROL; // 0x11
case Qt::Key_Pause: case Qt::Key_Pause:
return VK_PAUSE; // 0x13 return VK_PAUSE; // 0x13
case Qt::Key_CapsLock: case Qt::Key_CapsLock:
@@ -527,3 +532,24 @@ void AutoTypeExecutorWin::execKey(AutoTypeKey* action)
::Sleep(25); ::Sleep(25);
} }
void AutoTypeExecutorWin::execClearField(AutoTypeClearField* action = nullptr)
{
Q_UNUSED(action);
m_platform->sendKey(Qt::Key_Control, true);
m_platform->sendKey(Qt::Key_Home, true);
m_platform->sendKey(Qt::Key_Home, false);
m_platform->sendKey(Qt::Key_Control, false);
::Sleep(25);
m_platform->sendKey(Qt::Key_Control, true);
m_platform->sendKey(Qt::Key_Shift, true);
m_platform->sendKey(Qt::Key_End, true);
m_platform->sendKey(Qt::Key_End, false);
m_platform->sendKey(Qt::Key_Shift, false);
m_platform->sendKey(Qt::Key_Control, false);
::Sleep(25);
m_platform->sendKey(Qt::Key_Backspace, true);
m_platform->sendKey(Qt::Key_Backspace, false);
::Sleep(25);
}

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de> * Copyright (C) 2016 Lennart Glauer <mail@lennart-glauer.de>
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -45,7 +46,7 @@ public:
void sendChar(const QChar& ch, bool isKeyDown); void sendChar(const QChar& ch, bool isKeyDown);
void sendKey(Qt::Key key, bool isKeyDown); void sendKey(Qt::Key key, bool isKeyDown);
Q_SIGNALS: signals:
void globalShortcutTriggered(); void globalShortcutTriggered();
private: private:
@@ -64,6 +65,7 @@ public:
void execChar(AutoTypeChar* action) override; void execChar(AutoTypeChar* action) override;
void execKey(AutoTypeKey* action) override; void execKey(AutoTypeKey* action) override;
void execClearField(AutoTypeClearField* action) override;
private: private:
AutoTypePlatformWin* const m_platform; AutoTypePlatformWin* const m_platform;

View File

@@ -1,6 +1,7 @@
/* /*
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de> * Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
* Copyright (C) 2000-2008 Tom Sato <VEF00200@nifty.ne.jp> * Copyright (C) 2000-2008 Tom Sato <VEF00200@nifty.ne.jp>
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -214,7 +215,7 @@ int AutoTypePlatformX11::platformEventFilter(void* event)
&& (!QApplication::activeWindow() || QApplication::activeWindow()->isMinimized()) && (!QApplication::activeWindow() || QApplication::activeWindow()->isMinimized())
&& m_loaded) { && m_loaded) {
if (type == XCB_KEY_PRESS) { if (type == XCB_KEY_PRESS) {
Q_EMIT globalShortcutTriggered(); emit globalShortcutTriggered();
} }
return 1; return 1;
@@ -435,6 +436,8 @@ KeySym AutoTypePlatformX11::keyToKeySym(Qt::Key key)
return XK_Tab; return XK_Tab;
case Qt::Key_Enter: case Qt::Key_Enter:
return XK_Return; return XK_Return;
case Qt::Key_Space:
return XK_space;
case Qt::Key_Up: case Qt::Key_Up:
return XK_Up; return XK_Up;
case Qt::Key_Down: case Qt::Key_Down:
@@ -471,6 +474,12 @@ KeySym AutoTypePlatformX11::keyToKeySym(Qt::Key key)
return XK_Print; return XK_Print;
case Qt::Key_ScrollLock: case Qt::Key_ScrollLock:
return XK_Scroll_Lock; return XK_Scroll_Lock;
case Qt::Key_Shift:
return XK_Shift_L;
case Qt::Key_Control:
return XK_Control_L;
case Qt::Key_Alt:
return XK_Alt_L;
default: default:
if (key >= Qt::Key_F1 && key <= Qt::Key_F16) { if (key >= Qt::Key_F1 && key <= Qt::Key_F16) {
return XK_F1 + (key - Qt::Key_F1); return XK_F1 + (key - Qt::Key_F1);
@@ -721,6 +730,12 @@ bool AutoTypePlatformX11::keysymModifiers(KeySym keysym, int keycode, unsigned i
* are set ON, many events will be sent. * are set ON, many events will be sent.
*/ */
void AutoTypePlatformX11::SendKeyPressedEvent(KeySym keysym) void AutoTypePlatformX11::SendKeyPressedEvent(KeySym keysym)
{
SendKey(keysym,true);
SendKey(keysym,false);
}
void AutoTypePlatformX11::SendKey(KeySym keysym, bool isKeyDown)
{ {
Window cur_focus; Window cur_focus;
int revert_to; int revert_to;
@@ -800,8 +815,11 @@ void AutoTypePlatformX11::SendKeyPressedEvent(KeySym keysym)
/* press and release key */ /* press and release key */
event.keycode = keycode; event.keycode = keycode;
SendEvent(&event, KeyPress); if (isKeyDown) {
SendEvent(&event, KeyRelease); SendEvent(&event, KeyPress);
} else {
SendEvent(&event, KeyRelease);
}
/* release the modifiers */ /* release the modifiers */
SendModifier(&event, press_mask, KeyRelease); SendModifier(&event, press_mask, KeyRelease);
@@ -831,13 +849,40 @@ AutoTypeExecutorX11::AutoTypeExecutorX11(AutoTypePlatformX11* platform)
void AutoTypeExecutorX11::execChar(AutoTypeChar* action) void AutoTypeExecutorX11::execChar(AutoTypeChar* action)
{ {
m_platform->SendKeyPressedEvent(m_platform->charToKeySym(action->character)); m_platform->SendKeyPressedEvent(m_platform->charToKeySym(action->character));
Tools::wait(25);
} }
void AutoTypeExecutorX11::execKey(AutoTypeKey* action) void AutoTypeExecutorX11::execKey(AutoTypeKey* action)
{ {
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(action->key)); m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(action->key));
Tools::wait(25);
} }
void AutoTypeExecutorX11::execClearField(AutoTypeClearField* action = nullptr)
{
Q_UNUSED(action);
timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 25 * 1000 * 1000;
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), true);
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(Qt::Key_Home));
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), false);
nanosleep(&ts, nullptr);
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), true);
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Shift), true);
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(Qt::Key_End));
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Shift), false);
m_platform->SendKey(m_platform->keyToKeySym(Qt::Key_Control), false);
nanosleep(&ts, nullptr);
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(Qt::Key_Backspace));
nanosleep(&ts, nullptr);
}
int AutoTypePlatformX11::initialTimeout() int AutoTypePlatformX11::initialTimeout()
{ {
return 500; return 500;

View File

@@ -1,6 +1,7 @@
/* /*
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de> * Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
* Copyright (C) 2000-2008 Tom Sato <VEF00200@nifty.ne.jp> * Copyright (C) 2000-2008 Tom Sato <VEF00200@nifty.ne.jp>
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -58,8 +59,9 @@ public:
KeySym keyToKeySym(Qt::Key key); KeySym keyToKeySym(Qt::Key key);
void SendKeyPressedEvent(KeySym keysym); void SendKeyPressedEvent(KeySym keysym);
void SendKey(KeySym keysym, bool isKeyDown);
Q_SIGNALS: signals:
void globalShortcutTriggered(); void globalShortcutTriggered();
private: private:
@@ -126,6 +128,7 @@ public:
void execChar(AutoTypeChar* action) override; void execChar(AutoTypeChar* action) override;
void execKey(AutoTypeKey* action) override; void execKey(AutoTypeKey* action) override;
void execClearField(AutoTypeClearField* action) override;
private: private:
AutoTypePlatformX11* const m_platform; AutoTypePlatformX11* const m_platform;

View File

@@ -1,4 +1,4 @@
# Copyright (C) 2010 Felix Geyer <debfx@fobos.de> # Copyright (C) 2017 KeePassXC Team
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -13,24 +13,33 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
include_directories(../src) set(cli_SOURCES
Clip.cpp
Clip.h
EntropyMeter.cpp
EntropyMeter.h
Extract.cpp
Extract.h
List.cpp
List.h
Merge.cpp
Merge.h
Show.cpp
Show.h)
add_executable(kdbx-extract kdbx-extract.cpp) add_library(cli STATIC ${cli_SOURCES})
target_link_libraries(kdbx-extract target_link_libraries(cli Qt5::Core Qt5::Widgets)
add_executable(keepassxc-cli keepassxc-cli.cpp)
target_link_libraries(keepassxc-cli
cli
keepassx_core keepassx_core
Qt5::Core Qt5::Core
${GCRYPT_LIBRARIES} ${GCRYPT_LIBRARIES}
${GPGERROR_LIBRARIES} ${GPGERROR_LIBRARIES}
${ZLIB_LIBRARIES}) ${ZLIB_LIBRARIES}
zxcvbn)
add_executable(kdbx-merge kdbx-merge.cpp) install(TARGETS keepassxc-cli
target_link_libraries(kdbx-merge BUNDLE DESTINATION . COMPONENT Runtime
keepassx_core RUNTIME DESTINATION ${CLI_INSTALL_DIR} COMPONENT Runtime)
Qt5::Core
${GCRYPT_LIBRARIES}
${GPGERROR_LIBRARIES}
${ZLIB_LIBRARIES})
add_executable(entropy-meter entropy-meter.cpp)
target_link_libraries(entropy-meter zxcvbn)

82
src/cli/Clip.cpp Normal file
View File

@@ -0,0 +1,82 @@
/*
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 or (at your option)
* version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <cstdlib>
#include <stdio.h>
#include "Clip.h"
#include <QApplication>
#include <QClipboard>
#include <QCommandLineParser>
#include <QStringList>
#include <QTextStream>
#include "gui/UnlockDatabaseDialog.h"
#include "core/Database.h"
#include "core/Entry.h"
#include "core/Group.h"
#include "gui/Clipboard.h"
int Clip::execute(int argc, char** argv)
{
QStringList arguments;
for (int i = 0; i < argc; ++i) {
arguments << QString(argv[i]);
}
QTextStream out(stdout);
QCommandLineParser parser;
parser.setApplicationDescription(QCoreApplication::translate("main", "Copy a password to the clipboard"));
parser.addPositionalArgument("database", QCoreApplication::translate("main", "Path of the database."));
QCommandLineOption guiPrompt(
QStringList() << "g"
<< "gui-prompt",
QCoreApplication::translate("main", "Use a GUI prompt unlocking the database."));
parser.addOption(guiPrompt);
parser.addPositionalArgument("entry", QCoreApplication::translate("main", "Name of the entry to clip."));
parser.process(arguments);
const QStringList args = parser.positionalArguments();
if (args.size() != 2) {
QCoreApplication app(argc, argv);
parser.showHelp(EXIT_FAILURE);
}
Database* db = nullptr;
QApplication app(argc, argv);
if (parser.isSet("gui-prompt")) {
db = UnlockDatabaseDialog::openDatabasePrompt(args.at(0));
} else {
db = Database::unlockFromStdin(args.at(0));
}
if (!db) {
return EXIT_FAILURE;
}
QString entryId = args.at(1);
Entry* entry = db->rootGroup()->findEntry(entryId);
if (!entry) {
qCritical("Entry %s not found.", qPrintable(entryId));
return EXIT_FAILURE;
}
Clipboard::instance()->setText(entry->password());
return EXIT_SUCCESS;
}

27
src/cli/Clip.h Normal file
View File

@@ -0,0 +1,27 @@
/*
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 or (at your option)
* version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEEPASSXC_CLIP_H
#define KEEPASSXC_CLIP_H
class Clip
{
public:
static int execute(int argc, char** argv);
};
#endif // KEEPASSXC_CLIP_H

View File

@@ -1,10 +1,21 @@
/* /*
Part of this code come from zxcvbn-c example. * Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
Copyright (c) 2015, Tony Evans *
Copyright (c) 2016, KeePassXC Team * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 or (at your option)
* version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
See zxcvbn/zxcvbn.cpp for complete COPYRIGHT Notice #include "EntropyMeter.h"
*/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -76,7 +87,7 @@ static void calculate(const char *pwd, int advanced)
} }
} }
int main(int argc, char **argv) int EntropyMeter::execute(int argc, char **argv)
{ {
printf("KeePassXC Entropy Meter, based on zxcvbn-c.\nEnter your password below or pass it as argv\n"); printf("KeePassXC Entropy Meter, based on zxcvbn-c.\nEnter your password below or pass it as argv\n");
printf(" Usage: entropy-meter [-a] [pwd1 pwd2 ...]\n> "); printf(" Usage: entropy-meter [-a] [pwd1 pwd2 ...]\n> ");

27
src/cli/EntropyMeter.h Normal file
View File

@@ -0,0 +1,27 @@
/*
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 or (at your option)
* version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEEPASSXC_ENTROPYMETER_H
#define KEEPASSXC_ENTROPYMETER_H
class EntropyMeter
{
public:
static int execute(int argc, char** argv);
};
#endif // KEEPASSXC_ENTROPYMETER_H

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2010 Felix Geyer <debfx@fobos.de> * Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -15,8 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <cstdlib>
#include <stdio.h> #include <stdio.h>
#include "Extract.h"
#include <QCommandLineParser> #include <QCommandLineParser>
#include <QCoreApplication> #include <QCoreApplication>
#include <QFile> #include <QFile>
@@ -24,46 +27,41 @@
#include <QTextStream> #include <QTextStream>
#include "core/Database.h" #include "core/Database.h"
#include "crypto/Crypto.h"
#include "format/KeePass2Reader.h" #include "format/KeePass2Reader.h"
#include "keys/CompositeKey.h" #include "keys/CompositeKey.h"
#include "keys/FileKey.h" #include "cli/PasswordInput.h"
#include "keys/PasswordKey.h"
int main(int argc, char **argv) int Extract::execute(int argc, char** argv)
{ {
QCoreApplication app(argc, argv); QCoreApplication app(argc, argv);
QTextStream out(stdout);
QCommandLineParser parser; QCommandLineParser parser;
parser.setApplicationDescription(QCoreApplication::translate("main", parser.setApplicationDescription(
"Extract and print a KeePassXC database file.")); QCoreApplication::translate("main", "Extract and print the content of a database."));
parser.addPositionalArgument("database", QCoreApplication::translate("main", "path of the database to extract.")); parser.addPositionalArgument("database", QCoreApplication::translate("main", "Path of the database to extract."));
parser.addHelpOption();
parser.process(app); parser.process(app);
const QStringList args = parser.positionalArguments(); const QStringList args = parser.positionalArguments();
if (args.size() != 1) { if (args.size() != 1) {
parser.showHelp(); parser.showHelp(EXIT_FAILURE);
return 1;
} }
if (!Crypto::init()) { out << "Insert the database password\n> ";
qFatal("Fatal error while testing the cryptographic functions:\n%s", qPrintable(Crypto::errorString())); out.flush();
}
static QTextStream inputTextStream(stdin, QIODevice::ReadOnly); QString line = PasswordInput::getPassword();
QString line = inputTextStream.readLine();
CompositeKey key = CompositeKey::readFromLine(line); CompositeKey key = CompositeKey::readFromLine(line);
QString databaseFilename = args.at(0); QString databaseFilename = args.at(0);
QFile dbFile(databaseFilename); QFile dbFile(databaseFilename);
if (!dbFile.exists()) { if (!dbFile.exists()) {
qCritical("File %s does not exist.", qPrintable(databaseFilename)); qCritical("File %s does not exist.", qPrintable(databaseFilename));
return 1; return EXIT_FAILURE;
} }
if (!dbFile.open(QIODevice::ReadOnly)) { if (!dbFile.open(QIODevice::ReadOnly)) {
qCritical("Unable to open file %s.", qPrintable(databaseFilename)); qCritical("Unable to open file %s.", qPrintable(databaseFilename));
return 1; return EXIT_FAILURE;
} }
KeePass2Reader reader; KeePass2Reader reader;
@@ -76,15 +74,13 @@ int main(int argc, char **argv)
if (reader.hasError()) { if (reader.hasError()) {
if (xmlData.isEmpty()) { if (xmlData.isEmpty()) {
qCritical("Error while reading the database:\n%s", qPrintable(reader.errorString())); qCritical("Error while reading the database:\n%s", qPrintable(reader.errorString()));
return 1; } else {
}
else {
qWarning("Error while parsing the database:\n%s\n", qPrintable(reader.errorString())); qWarning("Error while parsing the database:\n%s\n", qPrintable(reader.errorString()));
} }
return EXIT_FAILURE;
} }
QTextStream out(stdout);
out << xmlData.constData() << "\n"; out << xmlData.constData() << "\n";
return 0; return EXIT_SUCCESS;
} }

27
src/cli/Extract.h Normal file
View File

@@ -0,0 +1,27 @@
/*
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 or (at your option)
* version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEEPASSXC_EXTRACT_H
#define KEEPASSXC_EXTRACT_H
class Extract
{
public:
static int execute(int argc, char** argv);
};
#endif // KEEPASSXC_EXTRACT_H

94
src/cli/List.cpp Normal file
View File

@@ -0,0 +1,94 @@
/*
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 or (at your option)
* version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <cstdlib>
#include <stdio.h>
#include "List.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QCoreApplication>
#include <QStringList>
#include <QTextStream>
#include "gui/UnlockDatabaseDialog.h"
#include "core/Database.h"
#include "core/Entry.h"
#include "core/Group.h"
#include "keys/CompositeKey.h"
int List::execute(int argc, char** argv)
{
QStringList arguments;
for (int i = 0; i < argc; ++i) {
arguments << QString(argv[i]);
}
QTextStream out(stdout);
QCommandLineParser parser;
parser.setApplicationDescription(QCoreApplication::translate("main", "List database entries."));
parser.addPositionalArgument("database", QCoreApplication::translate("main", "Path of the database."));
parser.addPositionalArgument("group",
QCoreApplication::translate("main", "Path of the group to list. Default is /"),
QString("[group]"));
QCommandLineOption printUuidsOption(
QStringList() << "u"
<< "print-uuids",
QCoreApplication::translate("main", "Print the UUIDs of the entries and groups."));
parser.addOption(printUuidsOption);
QCommandLineOption guiPrompt(
QStringList() << "g"
<< "gui-prompt",
QCoreApplication::translate("main", "Use a GUI prompt unlocking the database."));
parser.addOption(guiPrompt);
parser.process(arguments);
const QStringList args = parser.positionalArguments();
if (args.size() != 1 && args.size() != 2) {
QCoreApplication app(argc, argv);
parser.showHelp(EXIT_FAILURE);
}
Database* db = nullptr;
if (parser.isSet("gui-prompt")) {
QApplication app(argc, argv);
db = UnlockDatabaseDialog::openDatabasePrompt(args.at(0));
} else {
QCoreApplication app(argc, argv);
db = Database::unlockFromStdin(args.at(0));
}
if (db == nullptr) {
return EXIT_FAILURE;
}
Group* group = db->rootGroup();
if (args.size() == 2) {
QString groupPath = args.at(1);
group = db->rootGroup()->findGroupByPath(groupPath);
if (group == nullptr) {
qCritical("Cannot find group %s.", qPrintable(groupPath));
return EXIT_FAILURE;
}
}
out << group->print(parser.isSet("print-uuids"));
out.flush();
return EXIT_SUCCESS;
}

27
src/cli/List.h Normal file
View File

@@ -0,0 +1,27 @@
/*
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 or (at your option)
* version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEEPASSXC_LIST_H
#define KEEPASSXC_LIST_H
class List
{
public:
static int execute(int argc, char** argv);
};
#endif // KEEPASSXC_LIST_H

104
src/cli/Merge.cpp Normal file
View File

@@ -0,0 +1,104 @@
/*
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 or (at your option)
* version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <cstdlib>
#include "Merge.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QCoreApplication>
#include <QStringList>
#include <QTextStream>
#include "core/Database.h"
#include "gui/UnlockDatabaseDialog.h"
int Merge::execute(int argc, char** argv)
{
QStringList arguments;
for (int i = 0; i < argc; ++i) {
arguments << QString(argv[i]);
}
QTextStream out(stdout);
QCommandLineParser parser;
parser.setApplicationDescription(QCoreApplication::translate("main", "Merge two databases."));
parser.addPositionalArgument("database1",
QCoreApplication::translate("main", "Path of the database to merge into."));
parser.addPositionalArgument("database2",
QCoreApplication::translate("main", "Path of the database to merge from."));
QCommandLineOption samePasswordOption(
QStringList() << "s"
<< "same-password",
QCoreApplication::translate("main", "Use the same password for both database files."));
QCommandLineOption guiPrompt(
QStringList() << "g"
<< "gui-prompt",
QCoreApplication::translate("main", "Use a GUI prompt unlocking the database."));
parser.addOption(guiPrompt);
parser.addOption(samePasswordOption);
parser.process(arguments);
const QStringList args = parser.positionalArguments();
if (args.size() != 2) {
QCoreApplication app(argc, argv);
parser.showHelp(EXIT_FAILURE);
}
Database* db1;
Database* db2;
if (parser.isSet("gui-prompt")) {
QApplication app(argc, argv);
db1 = UnlockDatabaseDialog::openDatabasePrompt(args.at(0));
if (!parser.isSet("same-password")) {
db2 = UnlockDatabaseDialog::openDatabasePrompt(args.at(1));
} else {
db2 = Database::openDatabaseFile(args.at(1), *(db1->key().clone()));
}
} else {
QCoreApplication app(argc, argv);
db1 = Database::unlockFromStdin(args.at(0));
if (!parser.isSet("same-password")) {
db2 = Database::unlockFromStdin(args.at(1));
} else {
db2 = Database::openDatabaseFile(args.at(1), *(db1->key().clone()));
}
}
if (db1 == nullptr) {
return EXIT_FAILURE;
}
if (db2 == nullptr) {
return EXIT_FAILURE;
}
db1->merge(db2);
QString errorMessage = db1->saveToFile(args.at(0));
if (!errorMessage.isEmpty()) {
qCritical("Unable to save database to file : %s", qPrintable(errorMessage));
return EXIT_FAILURE;
}
out << "Successfully merged the database files.\n";
return EXIT_SUCCESS;
}

Some files were not shown because too many files have changed in this diff Show More