mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
make ergo genpasswd warn for bad passwords
This commit is contained in:
parent
404bf6c2a0
commit
7d5cb723b4
2 changed files with 8 additions and 4 deletions
4
ergo.go
4
ergo.go
|
|
@ -128,6 +128,10 @@ Options:
|
|||
} else {
|
||||
password = getPassword()
|
||||
}
|
||||
if err := irc.ValidatePassphrase(password); err != nil {
|
||||
log.Printf("WARNING: this password contains characters that may cause problems with your IRC client software.\n")
|
||||
log.Printf("We strongly recommend choosing a different password.\n")
|
||||
}
|
||||
hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.MinCost)
|
||||
if err != nil {
|
||||
log.Fatal("encoding error:", err.Error())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue