aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/faucet
diff options
context:
space:
mode:
authordipingxian2 <39109351+dipingxian2@users.noreply.github.com>2018-09-04 19:16:49 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-09-04 19:16:49 +0800
commit003e031994327ab24900aa95e0f516a13e97f76f (patch)
tree8aab00d842715306c65c39c0b4f3c48bc9aac772 /cmd/faucet
parent32f28a9360d26a661d55915915f12fd3c70f012b (diff)
downloaddexon-003e031994327ab24900aa95e0f516a13e97f76f.tar.gz
dexon-003e031994327ab24900aa95e0f516a13e97f76f.tar.zst
dexon-003e031994327ab24900aa95e0f516a13e97f76f.zip
cmd/faucet: remove trailing newline in password (#17558)
Fixes #17557
Diffstat (limited to 'cmd/faucet')
-rw-r--r--cmd/faucet/faucet.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go
index 679906027..cfe4e45f1 100644
--- a/cmd/faucet/faucet.go
+++ b/cmd/faucet/faucet.go
@@ -157,7 +157,8 @@ func main() {
if blob, err = ioutil.ReadFile(*accPassFlag); err != nil {
log.Crit("Failed to read account password contents", "file", *accPassFlag, "err", err)
}
- pass := string(blob)
+ // Delete trailing newline in password
+ pass := strings.TrimSuffix(string(blob), "\n")
ks := keystore.NewKeyStore(filepath.Join(os.Getenv("HOME"), ".faucet", "keys"), keystore.StandardScryptN, keystore.StandardScryptP)
if blob, err = ioutil.ReadFile(*accJSONFlag); err != nil {