Skip to content

Commit

Permalink
Update nickserv.go
Browse files Browse the repository at this point in the history
Compare the case-normalized target to Account()
  • Loading branch information
slingamn authored Feb 14, 2024
1 parent 9d53d9f commit 136dd1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion irc/nickserv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down

0 comments on commit 136dd1a

Please sign in to comment.