about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2014-01-27 22:59:54 +0100
committerAlexander Barton <alex@barton.de>2014-01-27 23:05:29 +0100
commit20b52fe33dc3387d50790ed6da8c47c34277527a (patch)
treea1abc4ad354ec3534402a0f0c7e881c2d6bfdc25
parent0fc822d8c44be42a62d3c26bbab99d5d0bc88346 (diff)
downloadngircd-20b52fe33dc3387d50790ed6da8c47c34277527a.tar.gz
ngircd-20b52fe33dc3387d50790ed6da8c47c34277527a.zip
Correctly use cloaked IRC masks on "INVITE nickname"
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!
-rw-r--r--src/ngircd/irc-op.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ngircd/irc-op.c b/src/ngircd/irc-op.c
index 23db579e..449cecfb 100644
--- a/src/ngircd/irc-op.c
+++ b/src/ngircd/irc-op.c
@@ -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;
 		}
 	}