mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
add warning about weak password when setting password via cli too
This commit is contained in:
parent
dedc90f455
commit
dfd7b721ae
1 changed files with 10 additions and 1 deletions
11
main.go
11
main.go
|
@ -957,7 +957,16 @@ The password is read from stdin. Its bcrypt hash is stored in a file named
|
||||||
}
|
}
|
||||||
|
|
||||||
func xreadpassword() string {
|
func xreadpassword() string {
|
||||||
fmt.Println("Type new password. Password WILL echo.")
|
fmt.Printf(`
|
||||||
|
Type new password. Password WILL echo.
|
||||||
|
|
||||||
|
WARNING: Bots will try to bruteforce your password. Connections with failed
|
||||||
|
authentication attempts will be rate limited but attackers WILL find weak
|
||||||
|
passwords. If your account is compromised, spammers are likely to abuse your
|
||||||
|
system, spamming your address and the wider internet in your name. So please
|
||||||
|
pick a random, unguessable password, preferrably at least 12 characters.
|
||||||
|
|
||||||
|
`)
|
||||||
fmt.Printf("password: ")
|
fmt.Printf("password: ")
|
||||||
buf := make([]byte, 64)
|
buf := make([]byte, 64)
|
||||||
n, err := os.Stdin.Read(buf)
|
n, err := os.Stdin.Read(buf)
|
||||||
|
|
Loading…
Reference in a new issue