GNU bug report logs - #37344
rcirc: nil gets interpreted as a nickname

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Naïm Favier <n.emacs@HIDDEN>; Keywords: patch; dated Sun, 8 Sep 2019 19:06:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) patch. Request was from Naïm Favier <n.emacs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 37344 <at> debbugs.gnu.org:


Received: (at 37344) by debbugs.gnu.org; 9 Sep 2019 14:37:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 09 10:37:30 2019
Received: from localhost ([127.0.0.1]:40401 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i7KnJ-0007zh-Qi
	for submit <at> debbugs.gnu.org; Mon, 09 Sep 2019 10:37:30 -0400
Received: from mail-io1-f65.google.com ([209.85.166.65]:38460)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <fnaim42@HIDDEN>) id 1i7GQ4-00071Q-QC
 for 37344 <at> debbugs.gnu.org; Mon, 09 Sep 2019 05:57:13 -0400
Received: by mail-io1-f65.google.com with SMTP id k5so1926719iol.5
 for <37344 <at> debbugs.gnu.org>; Mon, 09 Sep 2019 02:57:12 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=wuOcRSbvMUm20OwizjX0v02QFDAC0LDKpeqc6YBCOyU=;
 b=TtF9B/tD0k65JkLNIDBUrlkF88kbCP78dlgeiWJqpEgf0Ur4Icnyrbra7KFJU5A5TO
 +K0qlKkx5f26yEoINLgvqr27A/UlboeNxaeUcIR1izAVWdvHxfGCKnfgpqqfxaQdREwd
 9LwvRSITxw2vHKDEEf5shEyb44aFBSNnLKPAXG/31eYVmZVZ0qW9D0eeoDqxWqP1VfmO
 Cerax9zJPaA+Nd3gl/RMagNe7CA0j0Ssyk8emr444NHVOJikL/xJA0Ebdz9fRA5Rid9s
 mjSqOSM4sTyIaSCVMUbCLMuLj1tcmwqdvW3Wk0nNywFI0HclohE0RkZtswqhwAvzO9Oc
 O29Q==
X-Gm-Message-State: APjAAAXu0pzlEcr9RBE1S4dm4MKQftbBBbFSRQb1c5V2zei1BRDHDfpM
 0XJgRQ5J491osDGmO0v8infMDKWvRCw=
X-Google-Smtp-Source: APXvYqwVkyPo89JF5FrU08P+WBCpyern2nGvDREJTl707wPK6FRGZxohnHZ03pBkodnZ9N5zr/BCxg==
X-Received: by 2002:a6b:5b07:: with SMTP id v7mr3755980ioh.76.1568023026894;
 Mon, 09 Sep 2019 02:57:06 -0700 (PDT)
Received: from mail-io1-f43.google.com (mail-io1-f43.google.com.
 [209.85.166.43])
 by smtp.gmail.com with ESMTPSA id i14sm11596018ioi.47.2019.09.09.02.57.06
 for <37344 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 09 Sep 2019 02:57:06 -0700 (PDT)
Received: by mail-io1-f43.google.com with SMTP id r8so2303522iol.10
 for <37344 <at> debbugs.gnu.org>; Mon, 09 Sep 2019 02:57:06 -0700 (PDT)
X-Received: by 2002:a5e:aa1a:: with SMTP id s26mr4456014ioe.96.1568023026361; 
 Mon, 09 Sep 2019 02:57:06 -0700 (PDT)
MIME-Version: 1.0
References: <CAHEx5uvOD5WHzSE8JXf1-Lf_XDEwfY6uF-X3a90Qv3ASqPX4cw@HIDDEN>
 <m1woeiw9bp.fsf@HIDDEN>
In-Reply-To: <m1woeiw9bp.fsf@HIDDEN>
From: =?UTF-8?B?TmHDr20gRmF2aWVy?= <n.emacs@HIDDEN>
Date: Mon, 9 Sep 2019 11:56:55 +0200
X-Gmail-Original-Message-ID: <CAHEx5uthE21xGQb0pRi1DtPanEFJ0-khsgUHTW-XkFwYWGLDXw@HIDDEN>
Message-ID: <CAHEx5uthE21xGQb0pRi1DtPanEFJ0-khsgUHTW-XkFwYWGLDXw@HIDDEN>
Subject: Re: bug#37344: rcirc: nil gets interpreted as a nickname
To: Leo Liu <sdl.web@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 37344
X-Mailman-Approved-At: Mon, 09 Sep 2019 10:37:29 -0400
Cc: 37344 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Yes, it does.

On Mon, 9 Sep 2019 at 03:24, Leo Liu <sdl.web@HIDDEN> wrote:
>
> On 2019-09-08 20:58 +0200, Na=C3=AFm Favier wrote:
> > Severity: normal
> >
> > Ever since I changed my nickname to "nil" on Freenode, I've been
> > getting occasional private messages from unknown users consisting of a
> > single empty CTCP ACTION. After a bit of investigating, it turned out
> > they all used rcirc. The situation was clear at that point: somewhere
> > in rcirc's source code, a nil value is being implicitly converted to a
> > string and used as the target of a PRIVMSG command.
> >
> > The bug seems to be reproducible by issuing "/me" (without arguments)
> > inside a server buffer: the "nil" user on that server gets sent an
> > empty ACTION.
> >
> > Suggested fix: in rcirc-send-privmsg, fail if target is nil. It might
> > be useful to check other places where the "%s" format is used, to
> > discover similar bugs.
>
> Thanks. Does the following patch fix the issue?
>
> diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
> index de524d9e..d95db26c 100644
> --- a/lisp/net/rcirc.el
> +++ b/lisp/net/rcirc.el
> @@ -825,6 +825,7 @@ Function is called with PROCESS, COMMAND, SENDER, ARG=
S and LINE.")
>      (process-send-string process string)))
>
>  (defun rcirc-send-privmsg (process target string)
> +  (cl-check-type target string)
>    (rcirc-send-string process (format "PRIVMSG %s :%s" target string)))
>
>  (defun rcirc-send-ctcp (process target request &optional args)
> @@ -2337,8 +2338,8 @@ With a prefix arg, prompt for new topic."
>    (let ((timestamp (format-time-string "%s")))
>      (rcirc-send-ctcp process target "PING" timestamp)))
>
> -(defun rcirc-cmd-me (args &optional process target)
> -  (rcirc-send-ctcp process target "ACTION" args))
> +(defun rcirc-cmd-me (args process target)
> +  (when target (rcirc-send-ctcp process target "ACTION" args)))
>
>  (defun rcirc-add-or-remove (set &rest elements)
>    (dolist (elt elements)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#37344; Package emacs. Full text available.

Message received at 37344 <at> debbugs.gnu.org:


Received: (at 37344) by debbugs.gnu.org; 9 Sep 2019 01:24:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 08 21:24:40 2019
Received: from localhost ([127.0.0.1]:39361 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i78Q4-00061v-6j
	for submit <at> debbugs.gnu.org; Sun, 08 Sep 2019 21:24:40 -0400
Received: from mail-pg1-f196.google.com ([209.85.215.196]:41938)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sdl.web@HIDDEN>) id 1i78Q1-00061d-LN
 for 37344 <at> debbugs.gnu.org; Sun, 08 Sep 2019 21:24:38 -0400
Received: by mail-pg1-f196.google.com with SMTP id x15so6814811pgg.8
 for <37344 <at> debbugs.gnu.org>; Sun, 08 Sep 2019 18:24:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:face:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=PieM5zr0OTnkbzEhL8Uj0m5uy767ub5D2Hf4npRQf8c=;
 b=RlIJBgQfBbmFODOY63iob7Pau2ja2yANR3PvJOlqaBIsPwj4D/hEJNRZ+93Y8b3MuP
 OXKuuW9tynC8F7HbvYEbz0zTzfCmh0XEEnaJ0umCRLEgMLFPC4PCbJ1jkNQH2Kt+EG+R
 78A2cdgXOANDJ+bSjorISVXCZn2OZtbyikTkcN6e+iYDdRNnMmagnLxw2C9jBKk14e7t
 WR06P90Ik5Iuxx8GxV2H6wOWQyVWn+7O4vZl1C+9U79AsNE/b1pMGF5Z2Ly6j6iWzFAY
 2oCY3Z117/yEcOzCBNTHJMkSULFf185t9qi8tknHOukbljPMfkPeT/vSI2ZzPAuROyrZ
 B/tQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:face:date
 :in-reply-to:message-id:user-agent:mime-version
 :content-transfer-encoding;
 bh=PieM5zr0OTnkbzEhL8Uj0m5uy767ub5D2Hf4npRQf8c=;
 b=sR/8gp42OV++IXX228pY3SHv/uvSZhMoWECJc22CcWJ3B3kevkmbjgklypk9ebEFpW
 8F+3trBM+QvEd41PHeHkeJjhHTr1U3f5cl41l/OmD+f8m5UTADi/+nQffWPaw/dt3zgx
 6IFIzRo5nHTL6KOVhu+GvJKfI1HvgSSNv7YyXmCkxM92MfWHCp9UyjfxEtzl7k/pT+0j
 lIcikR0DNxYTnsdC7+UrSSLgKJ8DElyEebNHZIdN61LsJiktbYcfrpWWMY+jPvA1Qpy9
 CsbQsNTh/kAUE1Plh/uEn1W03jP5XIj8EQfdtCcbOhUnW57hYapF1XTBFO8i2hiWtysL
 RycA==
X-Gm-Message-State: APjAAAXq+e0YkSn2vhDjy00a2EhwgQzqCF1upZrLMFloISKkBBuK9UUL
 qaxobGKHdQ7vOE1CmYFQXCd9dTNq
X-Google-Smtp-Source: APXvYqzbsbbBt6u/pf3xGM+n2MYWp7jlZhVIMSLUzW2DSSonfBfKj+U9PLBCX5irYUxQgB1Vu1gYLA==
X-Received: by 2002:a17:90a:2e08:: with SMTP id
 q8mr23195566pjd.43.1567992271389; 
 Sun, 08 Sep 2019 18:24:31 -0700 (PDT)
Received: from Zeuss-MacBook-Air.local ([112.208.225.37])
 by smtp.gmail.com with ESMTPSA id v8sm10037055pgs.82.2019.09.08.18.24.29
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 08 Sep 2019 18:24:30 -0700 (PDT)
From: Leo Liu <sdl.web@HIDDEN>
To: =?iso-8859-1?Q?Na=EFm?= Favier <n.emacs@HIDDEN>
Subject: Re: bug#37344: rcirc: nil gets interpreted as a nickname
References: <CAHEx5uvOD5WHzSE8JXf1-Lf_XDEwfY6uF-X3a90Qv3ASqPX4cw@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAElBMVEUAAAAAAP+LRRP0pGC+
 vr7///+7mT1iAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMO
 DhglKe4AAAEsSURBVCjPbZNBboQwDEV/Cd4X9QJRThApmn0XYW+Jyf2v0m+HhqDBgiAe9rcTG7QH
 w/1Vn2Ar8gBb/ocywSN3qK9T3z4eFDB4eApocBpeBs1RSykoJd8gQcm8pGmHXFso3ajnmsqV0TnY
 DQkOfXUfN5NwaI7AWTVOyEhcu1aHmdWItHddUVUcUgUBCkitu8V6ditHVOVdqzl2EQ1ZVGTbdK0V
 7cqn8vWzoU5Q/bF9Y/Y0cRU1xwkys5dJ+Dt6pBDWifcNQml8Gh2JVmPSoQzo7en0grswkxrUGYJ7
 0hSxxAGr7ZMwYcHIzprpi7TENEE1xtiYxixRlCfPBsUUrwHD7uGIwATrbnODJcVrPpVn3hxiGloe
 m/S+z3CtuzUSMo83N4DPH+F0evwR3P4A2k+75838OKQAAAAASUVORK5CYII=
Date: Mon, 09 Sep 2019 09:24:26 +0800
In-Reply-To: <CAHEx5uvOD5WHzSE8JXf1-Lf_XDEwfY6uF-X3a90Qv3ASqPX4cw@HIDDEN>
 (=?iso-8859-1?Q?=22Na=EFm?= Favier"'s message of "Sun, 8 Sep 2019 20:58:59
 +0200")
Message-ID: <m1woeiw9bp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (macOS 10.14.6)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 37344
Cc: 37344 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2019-09-08 20:58 +0200, Na=EFm Favier wrote:
> Severity: normal
>
> Ever since I changed my nickname to "nil" on Freenode, I've been
> getting occasional private messages from unknown users consisting of a
> single empty CTCP ACTION. After a bit of investigating, it turned out
> they all used rcirc. The situation was clear at that point: somewhere
> in rcirc's source code, a nil value is being implicitly converted to a
> string and used as the target of a PRIVMSG command.
>
> The bug seems to be reproducible by issuing "/me" (without arguments)
> inside a server buffer: the "nil" user on that server gets sent an
> empty ACTION.
>
> Suggested fix: in rcirc-send-privmsg, fail if target is nil. It might
> be useful to check other places where the "%s" format is used, to
> discover similar bugs.

Thanks. Does the following patch fix the issue?

diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index de524d9e..d95db26c 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -825,6 +825,7 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS =
and LINE.")
     (process-send-string process string)))
=20
 (defun rcirc-send-privmsg (process target string)
+  (cl-check-type target string)
   (rcirc-send-string process (format "PRIVMSG %s :%s" target string)))
=20
 (defun rcirc-send-ctcp (process target request &optional args)
@@ -2337,8 +2338,8 @@ With a prefix arg, prompt for new topic."
   (let ((timestamp (format-time-string "%s")))
     (rcirc-send-ctcp process target "PING" timestamp)))
=20
-(defun rcirc-cmd-me (args &optional process target)
-  (rcirc-send-ctcp process target "ACTION" args))
+(defun rcirc-cmd-me (args process target)
+  (when target (rcirc-send-ctcp process target "ACTION" args)))
=20
 (defun rcirc-add-or-remove (set &rest elements)
   (dolist (elt elements)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#37344; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Sep 2019 19:05:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 08 15:05:53 2019
Received: from localhost ([127.0.0.1]:39130 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i72VV-0007Ta-Cs
	for submit <at> debbugs.gnu.org; Sun, 08 Sep 2019 15:05:53 -0400
Received: from lists.gnu.org ([209.51.188.17]:51485)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <fnaim42@HIDDEN>) id 1i72P4-0007F1-1q
 for submit <at> debbugs.gnu.org; Sun, 08 Sep 2019 14:59:14 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51125)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <fnaim42@HIDDEN>) id 1i72P3-0000wS-0o
 for bug-gnu-emacs@HIDDEN; Sun, 08 Sep 2019 14:59:13 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: **
X-Spam-Status: No, score=2.8 required=5.0 tests=BAYES_50,
 FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FROM_EXCESS_BASE64,
 RCVD_IN_DNSWL_NONE,SPOOFED_FREEMAIL autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <fnaim42@HIDDEN>) id 1i72P2-0007Jd-34
 for bug-gnu-emacs@HIDDEN; Sun, 08 Sep 2019 14:59:12 -0400
Received: from mail-io1-f46.google.com ([209.85.166.46]:43699)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <fnaim42@HIDDEN>) id 1i72P1-0007JO-Uz
 for bug-gnu-emacs@HIDDEN; Sun, 08 Sep 2019 14:59:12 -0400
Received: by mail-io1-f46.google.com with SMTP id u185so23808680iod.10
 for <bug-gnu-emacs@HIDDEN>; Sun, 08 Sep 2019 11:59:11 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=F05w9t7g+4MBe2mRdjrqrA6qwaarQEyt+yYRzUCZR68=;
 b=giXN1m7xJhzSdh/EQ0YmR76toNqBLjB7VljXOTvEa0akOq6CSSSqR+vgHCCNOuyeQw
 8fktHDfqFnyiVFolT/cciNp8Cal7PF24EOJX6+iwE+8sXjwJMmIFW1JmmhF5EMXYEqxY
 UqAr570saNOpzZbLYV7Vv3OsnwyiqszxKwQdzHHN42WhulC80MYRO96axXJUdKoZ5xhc
 zHXLjpv8Pz1QwhJ8bvglR9RrmHZQ/uVDHDAtwoGRhwxj80QAwPntXyItvIA7N0vQT+vQ
 BV/12CHW4o5nYOdGHiaZiWzeuPh3dfkObLzH9l1xWiHxmMLBysuWfT5qjULxw1CB1t4N
 BOrg==
X-Gm-Message-State: APjAAAWXAMn1oYF93hXuWh2Tn18ggVZ6xNZ5sTFGegHa3AiW//tNUMVR
 sl9YYk3uZ1cfJMmFmu0bRV2zZpNeCEI=
X-Google-Smtp-Source: APXvYqw9RoHJBGaPzhsI0XCrGsxhkbPXMqBWb2zeVrCWquIkKwkCZc/FpFnNiGBsHVqkLRBX3JPAvw==
X-Received: by 2002:a6b:8d06:: with SMTP id p6mr9883508iod.219.1567969150846; 
 Sun, 08 Sep 2019 11:59:10 -0700 (PDT)
Received: from mail-io1-f49.google.com (mail-io1-f49.google.com.
 [209.85.166.49])
 by smtp.gmail.com with ESMTPSA id l186sm30052679ioa.54.2019.09.08.11.59.10
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 08 Sep 2019 11:59:10 -0700 (PDT)
Received: by mail-io1-f49.google.com with SMTP id d17so1989232ios.13
 for <bug-gnu-emacs@HIDDEN>; Sun, 08 Sep 2019 11:59:10 -0700 (PDT)
X-Received: by 2002:a6b:e90d:: with SMTP id u13mr21019282iof.64.1567969150206; 
 Sun, 08 Sep 2019 11:59:10 -0700 (PDT)
MIME-Version: 1.0
From: =?UTF-8?B?TmHDr20gRmF2aWVy?= <n.emacs@HIDDEN>
Date: Sun, 8 Sep 2019 20:58:59 +0200
X-Gmail-Original-Message-ID: <CAHEx5uvOD5WHzSE8JXf1-Lf_XDEwfY6uF-X3a90Qv3ASqPX4cw@HIDDEN>
Message-ID: <CAHEx5uvOD5WHzSE8JXf1-Lf_XDEwfY6uF-X3a90Qv3ASqPX4cw@HIDDEN>
Subject: rcirc: nil gets interpreted as a nickname
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 209.85.166.46
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 08 Sep 2019 15:05:51 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

Severity: normal

Ever since I changed my nickname to "nil" on Freenode, I've been
getting occasional private messages from unknown users consisting of a
single empty CTCP ACTION. After a bit of investigating, it turned out
they all used rcirc. The situation was clear at that point: somewhere
in rcirc's source code, a nil value is being implicitly converted to a
string and used as the target of a PRIVMSG command.

The bug seems to be reproducible by issuing "/me" (without arguments)
inside a server buffer: the "nil" user on that server gets sent an
empty ACTION.

Suggested fix: in rcirc-send-privmsg, fail if target is nil. It might
be useful to check other places where the "%s" format is used, to
discover similar bugs.




Acknowledgement sent to Naïm Favier <n.emacs@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#37344; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 11 Sep 2019 18:00:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.