Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding --no-password option to CLI #2708

Merged
merged 1 commit into from
Mar 24, 2019

Conversation

louib
Copy link
Member

@louib louib commented Feb 16, 2019

I also added tests for the --key-file option, which was
untested.

Closes #1873

@phoerious this is one the reasons why I opened #1873 last week. This way adding features to unlockDatabase is normalized across the CLI commands.

Type of change

  • ✅ Bug fix (non-breaking change which fixes an issue)
  • ✅ Refactor (significant modification to existing code)
  • ✅ New feature (non-breaking change which adds functionality)
  • ✅ Breaking change (fix or feature that would cause existing functionality to change)
  • ✅ Documentation (non-code change)

Description and Context

Testing strategy

Local testing + unit tests.

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ✅ My code follows the code style of this project. [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.
  • ✅ I have added tests to cover my changes.

@droidmonkey
Copy link
Member

Tests are failing for Windows

@louib
Copy link
Member Author

louib commented Feb 16, 2019

@droidmonkey should be good now!

@droidmonkey droidmonkey added this to the v2.4.1 milestone Feb 17, 2019
I also added tests for the --key-file option, which was
untested.
@droidmonkey droidmonkey changed the base branch from develop to release/2.4.1 March 24, 2019 13:03
@droidmonkey droidmonkey merged commit 13a9ac8 into keepassxreboot:release/2.4.1 Mar 24, 2019
@louib louib deleted the no_password branch March 24, 2019 17:31
droidmonkey added a commit that referenced this pull request Apr 12, 2019
- Fix database deletion when using unsafe saves to a different file system [#2889]
- Fix opening databases with legacy key files that contain '/' [#2872]
- Fix opening database files from the command line [#2919]
- Fix crash when editing master key [#2836]
- Fix multiple issues with apply button behavior [#2947]
- Fix issues on application startup (tab order, --pw-stdin, etc.) [#2830]
- Fix building without WITH_XC_KEESHARE
- Fix reference entry coloring on macOS dark mode [#2984]
- Hide window when performing entry auto-type on macOS [#2969]
- Improve UX of update checker; reduce checks to every 7 days [#2968]
- KeeShare improvements [#2946, #2978, #2824]
- Re-enable Ctrl+C to copy password from search box [#2947]
- Add KeePassXC-Browser integration for Brave browser [#2933]
- SSH Agent: Re-Add keys on database unlock [#2982]
- SSH Agent: Only remove keys on app exit if they are removed on lock [#2985]
- CLI: Add --no-password option [#2708]
- CLI: Improve database extraction to XML [#2698]
- CLI: Don't call mandb on build [#2774]
- CLI: Add debug info [#2714]
- Improve support for Snap theming [#2832]
- Add support for building on Haiku OS [#2859]
- Ctrl+PgDn now goes to the next tab and Ctrl+PgUp to the previous
- Fix compiling on GCC 5 / Xenial [#2990]
- Add .gitrev output to tarball for third-party builds [#2970]
- Add WITH_XC_UPDATECHECK compile flag to toggle the update checker [#2968]
@arvinep
Copy link

arvinep commented Apr 17, 2019

Thanks for this feature.
I have difficulty to find the documentation as I try to figure how to use it.

Trying to use --no-password is failing:

$ keepassxc-cli clip --no-password -k /home/kepassxc_key /home/keepassxc.kdbx <Entry>
Error while reading the database: Invalid credentials were provided, please try again.
If this reoccurs, then your database file may be corrupt.

While skipping --no-password and entering the password works perfectly fine.

$ keepassxc-cli clip -k /home/kepassxc_key /home/keepassxc.kdbx <Entry>
Insert password to unlock /home/keepassxc.kdbx: 
Entry's password copied to the clipboard!

@droidmonkey
Copy link
Member

--no-password is meant for a database that does not have a "password" component of its master key. If you have to enter a password, you do not meet the requirements for --no-password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants