Merge pull request #1181 from slingamn/registerwarning

fix #1179
This commit is contained in:
Shivaram Lingamneni 2020-07-07 10:28:43 -07:00 committed by GitHub
commit f2d0842453
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -797,6 +797,14 @@ func nsRegisterHandler(server *Server, client *Client, command string, params []
}
}
if passphrase != "" {
cfPassphrase, err := Casefold(passphrase)
if err == nil && cfPassphrase == details.nickCasefolded {
nsNotice(rb, client.t("Usage: REGISTER <passphrase> [email]")) // #1179
return
}
}
if !nsLoginThrottleCheck(client, rb) {
return
}