]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Correctly use cloaked IRC masks on "INVITE nickname"
authorAlexander Barton <alex@barton.de>
Mon, 27 Jan 2014 21:59:54 +0000 (22:59 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 27 Jan 2014 22:05:29 +0000 (23:05 +0100)
The cloaked IRC mask of a user is his visible mask, so the daemon has
to use it for generating the "one time" entries for the invite list of
the given channel.

Without this patch, ngIRCd records the real IRC mask which will never
match while the target client is "+x", and even worse, will disclose
the real mask on "MODE #channel +I" commands :-/

Bug reported by Cahata on #ngircd, thanks!

src/ngircd/irc-op.c

index 23db579e725e1e54ef01faf4bfdd10616843ac76..449cecfb0534aaef10cb3fb51d69a6b7d682d6db 100644 (file)
@@ -194,7 +194,8 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
 
                if (remember) {
                        /* We must remember this invite */
-                       if (!Channel_AddInvite(chan, Client_Mask(target), true))
+                       if (!Channel_AddInvite(chan, Client_MaskCloaked(target),
+                                               true))
                                return CONNECTED;
                }
        }