Update nickserv.go

Compare the case-normalized target to Account()
This commit is contained in:
Shivaram Lingamneni 2024-02-14 09:53:17 -05:00 committed by GitHub
parent 9d53d9ff3a
commit 136dd1a2c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1398,7 +1398,7 @@ func nsCertHandler(service *ircService, server *Server, client *Client, command
case "add", "del":
if 2 <= len(params) {
target, certfp = params[0], params[1]
if client.Account() == target {
if cftarget, err := CasefoldName(target); err == nil && client.Account() == cftarget {
// If the target is equal to the account, then the user accidentally invoked operator
// syntax (cert add mynick <fp>) instead of self syntax (cert add <fp>).
target = ""