console: prevent importRawKey from getting into CLI history #21279 (#1526)

This commit is contained in:
Daniel Liu 2025-09-21 19:00:14 +08:00 committed by GitHub
parent 5ad87e559f
commit 1b5bc181f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,7 +38,8 @@ import (
)
var (
passwordRegexp = regexp.MustCompile(`personal.[nus]`)
// u: unlock, s: signXX, sendXX, n: newAccount, i: importXX
passwordRegexp = regexp.MustCompile(`personal.[nusi]`)
onlyWhitespace = regexp.MustCompile(`^\s*$`)
exit = regexp.MustCompile(`^\s*exit\s*;*\s*$`)
)