From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "J.P." Newsgroups: gmane.emacs.bugs Subject: bug#46777: 28.0.50; ERC: NickServ identification: Prompt for password after other sources, overall simplifications Date: Mon, 26 Jul 2021 00:39:39 -0700 Message-ID: <87sg01jzgk.fsf_-___26265.8926121489$1627285217$gmane$org@neverwas.me> References: <5495728.XOh7uYVVfo@ravel> <4764688.dQ8sKJKaaQ@ravel> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6579"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-erc@gnu.org, 46777@debbugs.gnu.org To: Olivier Certner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 26 09:40:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m7vDf-0001Yf-F7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Jul 2021 09:40:11 +0200 Original-Received: from localhost ([::1]:44838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7vDe-0003uo-Fr for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Jul 2021 03:40:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7vDW-0003rh-FH for bug-gnu-emacs@gnu.org; Mon, 26 Jul 2021 03:40:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7vDW-0004gR-76 for bug-gnu-emacs@gnu.org; Mon, 26 Jul 2021 03:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7vDW-0007OD-0H for bug-gnu-emacs@gnu.org; Mon, 26 Jul 2021 03:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Jul 2021 07:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46777 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46777-submit@debbugs.gnu.org id=B46777.162728519328384 (code B ref 46777); Mon, 26 Jul 2021 07:40:01 +0000 Original-Received: (at 46777) by debbugs.gnu.org; 26 Jul 2021 07:39:53 +0000 Original-Received: from localhost ([127.0.0.1]:49855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7vDM-0007Nk-UE for submit@debbugs.gnu.org; Mon, 26 Jul 2021 03:39:53 -0400 Original-Received: from mail-109-mta53.mxroute.com ([136.175.109.53]:46551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7vDK-0007NX-Ur for 46777@debbugs.gnu.org; Mon, 26 Jul 2021 03:39:51 -0400 Original-Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-109-mta53.mxroute.com (ZoneMTA) with ESMTPSA id 17ae1c157da000ae11.002 for <46777@debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Mon, 26 Jul 2021 07:39:42 +0000 X-Zone-Loop: 086700e2218bdd28e733cf3f05e2786d04d481a80bb4 X-Originating-IP: [149.28.56.236] In-Reply-To: <4764688.dQ8sKJKaaQ@ravel> (Olivier Certner's message of "Tue, 06 Jul 2021 16:52:06 +0200") X-AuthUser: masked@neverwas.me X-Zone-Spam-Resolution: no action X-Zone-Spam-Status: No, score=-0.1, required=15, tests=[ARC_NA=0, FROM_HAS_DN=0, RCPT_COUNT_THREE=0, TO_DN_SOME=0, MIME_GOOD=-0.1, FROM_EQ_ENVFROM=0, MIME_TRACE=0, RCVD_COUNT_ZERO=0, NEURAL_SPAM=0, MID_RHS_MATCH_FROM=0] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:210745 Archived-At: Olivier Certner writes: > * lisp/erc/erc-services.el (erc-nickserv-identify): Don't take the > password anymore as an argument (and don't prompt for it > interactively). On the contrary, now take the nick to use for > identification (interactively, ask for it, defaulting to the current > one). Move actual message sending into the new > `erc-nickserv-send-identify', and password prompting into > `erc-nickserv-get-password'. > > [...] > > -;;;###autoload > -(defun erc-nickserv-identify (password) > [...] > +;;;###autoload > +(defun erc-nickserv-identify (&optional nick) > + "Identify to NickServ immediately. Hi Olivier, this concerns your changes to the autoloaded command `erc-nickserv-identify'. Someone seeking help for a loosely related issue shared this on Libera today: (defun uh-erc-identify () (let ((pass (let ((s (shell-command-to-string "pass malc@irc.libera.chat"))) (substring s 0 -1)))) (erc-nickserv-identify pass))) It strikes me that other folks may be doing the same, namely, using this function in lisp code. So just to settle some imaginary nerves, it might help to flesh out exactly why there's little risk of something unfortunate/scary happening as a result of this interface change. As I see it, the worst case scenario is that your password is sent in place of your nick and ends up in the network's logs (where passwords are normally redacted). If that's a realistic concern, perhaps you should consider keeping the password param in its original position for the sake of compatibility. Just a thought. Also, I think the addition of the nick param bears some justifying too because it may not be clear from your commit log and emails (or #45340) why this is necessary. For me, the param is needed because some IRCds and services daemons won't let you auth by passing your currently assigned (perhaps unregistered) nick. In other words: PRIVMSG NickServ :IDENTIFY bob` mypass or PRIVMSG NickServ :IDENTIFY mypass won't work if you're trying to identify as "bob" and are currently "bob`". But without the nick param you've added, a user would be forced to issue the IRC command manually. Hope that's clear. BTW, I've noticed that many services automatically re-NICK you as confirmation of success, triggering `erc-nick-changed-functions', which `erc-nickserv-identify-on-nick-change' is a member of by default. So you get prompted again for no reason. (As you may be aware, double prompting has also come up recently in the ERC channel, but I suspect the two are unrelated.) Anyway, I doubt you'll recall, but I tried (rather unconvincingly) to raise this point earlier in this bug thread. If addressing this isn't in the cards, then hopefully we can get a ruling on this patch and start putting the days of scraping NickServ replies behind us (and begin embracing the evolving standard). Thanks.