-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add keyfile option to keepassxc cli import cmd #5402
Add keyfile option to keepassxc cli import cmd #5402
Conversation
Hi @Colfenor ! Thanks for the PR 🙏 There is a manpage for the CLI located in Tests for the CLI are located in Also, there seems to be some formatting issues with the PR. Formatting can be performed automatically by calling make format from the |
Hi @louib ! Thanks a lot for your info on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The password setting behavior is not the same for the db-create
and import
commands. By default, we don't ask for a password when creating the db, but we do when importing. I feel like the behavior should be the same, whichever we choose. @droidmonkey what do you think?
The behavior should be the same because its the same action "create a db" just one is blank the other has data in it. |
okidok, I added the SetPasswordOption to the import command and updated man-page + tests. |
Is it not because the |
Ah yes, I missed the argument. I just tested your statement, and can confirm that |
@Colfenor looking good! Can you do one last rebase? |
yay ! I'm still a bit new to |
That'll do it, but make sure everything looks good prior to force pushing it back up |
3cb935d
to
407b97a
Compare
Ok thanks for clarification ! I hope it worked out ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @Colfenor , thx a lot for your contribution 🎉 🍾
@Colfenor Ubuntu tests are failing though. Are they passing locally? |
@louib I checked the TeamCity build log (via guest login) and apparently the I haven't touched this test in this PR. |
DONE! Great work 🎉 |
Thank you :) and thanks a lot for reviewing & support ! |
Fixes #5311
Basically added the add keyFile logic from the create
command to the import command and moved the
loadFileKey()
functionto the
Utils
class since it is now used in both create & import classes.Testing strategy
export an existing Database with a keyfile to .xml
import it again using the keyfile option in the import command: (e.g.)
./keepassxc-cli import -k ~/test.key ~/test.xml ~/test.kdbx
at the current implementation state the filePath parameters have to be in that exact order.
Type of change