Commit Graph

13 Commits

Author SHA1 Message Date
Louis-Bertrand Varin
8324d03f0a Formatting the code. 2018-03-31 16:01:30 -04:00
thez3ro
1bfbb9242c
fix cli commands, translations and codestyle 2018-02-07 17:35:20 +01:00
Aleksa Sarai
9f8943c89b keepassxc-cli show: resolve references in output (#1280)
* core: database: make UUID searching case-insensitive

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

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

* cli: show: resolve references in output

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

Fixes: keepassxreboot/keepassxc#1260

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

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

* http: resolve references in AccessControlDialog

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

Fixes: keepassxreboot/keepassxc#1269


Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2017-12-17 10:44:12 -05:00
Aleksa Sarai
8e231dfa95 cli: show: add --attributes flag (#1289)
In order for scripting to be much simpler with `keepassxc-cli show`,
provide a simple --attributesk API which effectively is just a CLI
interface for entry->attributes()->value(...). This allows for more
extensibility and prevents changes in our output formatting from
breaking existing users of keepassxc-cli (if they use --attributes).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2017-12-16 19:14:39 -05:00
louib
1d30283514 Feature : --key-file option for CLI (#816)
* removing readFromLine

* Removing gui-prompt

* execute uses an arg list.

* Testing with key-file

* Fixing the -a option in EntropyMeter.
2017-07-25 13:41:52 -04:00
louib
3b23e68540 Refactoring : Introducing Command class for CLI commands (#778) 2017-07-17 15:16:53 -04:00
louib
95baf25648 failure when showing help (#658) 2017-06-21 19:09:44 -04:00
Weslly
400073c7cc Disable stdin echo when entering passwords on cli 2017-06-21 11:15:59 -03:00
thez3ro
a53b111182
Update and fix copyright headers 2017-06-14 15:54:43 +02:00
louib
a2e82dc883 Feature : clip command (#578) 2017-05-19 14:04:11 -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