1
0
Fork 0
forked from External/ergo
This commit is contained in:
Shivaram Lingamneni 2019-05-29 04:25:20 -04:00
parent ed85dd519f
commit 1a1d3ff89f
4 changed files with 51 additions and 42 deletions

View file

@ -397,6 +397,10 @@ func validatePassphrase(passphrase string) error {
if len(passphrase) == 0 || len(passphrase) > 600 {
return errAccountBadPassphrase
}
// we use * as a placeholder in some places, if it's gotten this far then fail
if passphrase == "*" {
return errAccountBadPassphrase
}
// for now, just enforce that spaces are not allowed
for _, r := range passphrase {
if unicode.IsSpace(r) {