From 1e2fbb03cad644ea1941642a9aa8ea97adfcb187 Mon Sep 17 00:00:00 2001 From: max furman Date: Thu, 26 Nov 2020 14:06:21 -0500 Subject: [PATCH] Do not allow empty password in step cert create ... - unless --no-password --insecure used --- command/certificate/create.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/certificate/create.go b/command/certificate/create.go index a5a32e4a5..f20498908 100644 --- a/command/certificate/create.go +++ b/command/certificate/create.go @@ -714,7 +714,8 @@ func savePrivateKey(filename string, priv interface{}, insecure bool) error { } var pass []byte - pass, err := ui.PromptPassword("Please enter the password to encrypt the private key") + pass, err := ui.PromptPassword("Please enter the password to encrypt the private key", + ui.WithValidateNotEmpty()) if err != nil { return errors.Wrap(err, "error reading password") }