mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-02 20:54:23 +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:
committed by
Rusty Russell
parent
be75518559
commit
58ce4cf71c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user