mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
cli: check if the pass and the confirmation pass match
Changelog-Fixed: check if the pass and the confirmation pass match from the command line Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
parent
be75518559
commit
58ce4cf71c
1 changed files with 6 additions and 0 deletions
|
@ -518,6 +518,12 @@ static char *opt_set_hsm_password(struct lightningd *ld)
|
|||
passwd_confirmation = read_stdin_pass_with_exit_code(&err_msg, &opt_exitcode);
|
||||
if (!passwd_confirmation)
|
||||
return err_msg;
|
||||
|
||||
if (!streq(passwd, passwd_confirmation)) {
|
||||
opt_exitcode = HSM_BAD_PASSWORD;
|
||||
return "Passwords confirmation mismatch.";
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
ld->config.keypass = tal(NULL, struct secret);
|
||||
|
|
Loading…
Add table
Reference in a new issue