all: replace passPHRASE with passWORD in user interactions (#19932)

* Ref #19906 - replace passPHRASE with passWORD in any user interactions

this skips doccomments and variablenames to minimize impact. It does
however include a rename of the `ethkey` `changepassphrase` parameter

* console: fix JavaScript error capitalization
This commit is contained in:
SjonHortensius
2019-08-12 11:00:38 +02:00
committed by Péter Szilágyi
parent c9cdf144d5
commit 36994e4e0b
19 changed files with 94 additions and 94 deletions

View File

@ -31,18 +31,18 @@ import (
// promptPassphrase prompts the user for a passphrase. Set confirmation to true
// to require the user to confirm the passphrase.
func promptPassphrase(confirmation bool) string {
passphrase, err := console.Stdin.PromptPassword("Passphrase: ")
passphrase, err := console.Stdin.PromptPassword("Password: ")
if err != nil {
utils.Fatalf("Failed to read passphrase: %v", err)
utils.Fatalf("Failed to read password: %v", err)
}
if confirmation {
confirm, err := console.Stdin.PromptPassword("Repeat passphrase: ")
confirm, err := console.Stdin.PromptPassword("Repeat password: ")
if err != nil {
utils.Fatalf("Failed to read passphrase confirmation: %v", err)
utils.Fatalf("Failed to read password confirmation: %v", err)
}
if passphrase != confirm {
utils.Fatalf("Passphrases do not match")
utils.Fatalf("Passwords do not match")
}
}
@ -58,7 +58,7 @@ func getPassphrase(ctx *cli.Context) string {
if passphraseFile != "" {
content, err := ioutil.ReadFile(passphraseFile)
if err != nil {
utils.Fatalf("Failed to read passphrase file '%s': %v",
utils.Fatalf("Failed to read password file '%s': %v",
passphraseFile, err)
}
return strings.TrimRight(string(content), "\r\n")