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#59284: 29.0.50; Accept functions in place of passwords in ERC Date: Thu, 15 Dec 2022 06:22:18 -0800 Message-ID: <87k02sn3vp.fsf__41652.4977934145$1671114204$gmane$org@neverwas.me> References: <878rkcw931.fsf@neverwas.me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17573"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-erc@gnu.org To: 59284@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 15:23:16 2022 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 1p5p8l-0004LL-4D for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 15:23:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5p8f-0002Bg-AU; Thu, 15 Dec 2022 09:23:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5p8c-00029N-Kb for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 09:23:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5p8Y-0006E0-9E for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 09:23:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5p8Y-0006iw-0T for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 09:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 14:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59284 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59284-submit@debbugs.gnu.org id=B59284.167111414925821 (code B ref 59284); Thu, 15 Dec 2022 14:23:01 +0000 Original-Received: (at 59284) by debbugs.gnu.org; 15 Dec 2022 14:22:29 +0000 Original-Received: from localhost ([127.0.0.1]:43061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5p81-0006iP-HN for submit@debbugs.gnu.org; Thu, 15 Dec 2022 09:22:29 -0500 Original-Received: from mail-108-mta62.mxroute.com ([136.175.108.62]:45679) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5p7z-0006iJ-8E for 59284@debbugs.gnu.org; Thu, 15 Dec 2022 09:22:28 -0500 Original-Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta62.mxroute.com (ZoneMTA) with ESMTPSA id 185162a2eb50001d7e.001 for <59284@debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 15 Dec 2022 14:22:21 +0000 X-Zone-Loop: dc59c9ffc179115d73eac49f13e0b74a654b01a832fa X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=USJXa47VANxRNpxBfNQCOXY6MQFwd0xDjnTYe7Ld3Gc=; b=H0Xz1truNuWsJy3UEymM/cIYgb yMxh/NPO8xYJEAur+QLk2OHlVcf0KDELqGFmw5rVsZ51Zx+3T9sgHT5MWcJrJX8h9Dbmb4zBhviDp 72CiI1yF9bV/2ZMAhoazBLmI2fhADlICObXYNLwbUJxzATtDBhStroo193Az7P6zpKyfM2ctIDB5M 6CnDRJBbLfMpBJln3cVT+JWNg9KOl+idWm6/h+H9AnDzrXBJ8ZAzLOduTjpxxDDmC0SHxBh34Fo4W IcwAf2DPoWzvXqhahq8b3Kk9waZxd0HM7DewdMjwlAcZ2PKlkD0yBa5tG5ePwwLWvDr1ewDwajj+9 eCTiLXag==; In-Reply-To: <878rkcw931.fsf@neverwas.me> (J. P.'s message of "Tue, 15 Nov 2022 07:06:42 -0800") X-Authenticated-Id: masked@neverwas.me 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251097 Archived-At: --=-=-= Content-Type: text/plain This was recently added to emacs-29 as commit 5258f3616812da63526da7b1aadfe26fc384ef2a Author: F. Jason Park Date: Sun Nov 13 01:52:48 2022 -0800 Accept functions in place of passwords in ERC But I forgot to increment the logging-format version number. Here's a patch that does that and also ignores incoming messages when checking for redacted secrets, which is currently pointless. Anyone interested please take a look (preferably in the next few days). Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Increment-erc-debug-irc-protocol-version-to-2.patch >From 2ed44d72eb7d613dc594b69d2fcd075357cb3916 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Wed, 14 Dec 2022 20:03:15 -0800 Subject: [PATCH] Increment erc-debug-irc-protocol-version to 2 * lisp/erc/erc.el (erc-debug-irc-protocol-version): Change version to 2 to help dependent tooling detect redacted passwords. (erc-log-irc-protocol): Don't bother redacting incoming messages. (Bug#59284.) --- lisp/erc/erc.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 5e78096da5..6afa400478 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -2323,7 +2323,7 @@ erc-error (defvar erc-debug-irc-protocol-time-format "%FT%T.%6N%z " "Timestamp format string for protocol logger.") -(defconst erc-debug-irc-protocol-version "1" +(defconst erc-debug-irc-protocol-version "2" "Protocol log format version number. This exists to help tooling track changes to the format. @@ -2334,7 +2334,10 @@ erc-debug-irc-protocol-version double CRLF, if present, signals the end of a log. Session resumption is not supported. Logger lines must adhere to the following format: TIMESTAMP PEER-NAME FLOW-INDICATOR IRC-MESSAGE CRLF. Outgoing messages -are indicated with a >> and incoming with a <<.") +are indicated with a >> and incoming with a <<. + +In version 2, certain outgoing passwords are replaced by a string +of ten question marks.") (defvar erc-debug-irc-protocol nil "If non-nil, log all IRC protocol traffic to the buffer \"*erc-protocol*\". @@ -2390,7 +2393,7 @@ erc-log-irc-protocol (format "%s:%s" erc-session-server erc-session-port)))) (ts (when erc-debug-irc-protocol-time-format (format-time-string erc-debug-irc-protocol-time-format)))) - (when erc--debug-irc-protocol-mask-secrets + (when (and outbound erc--debug-irc-protocol-mask-secrets) (setq string (erc--mask-secrets string))) (with-current-buffer (get-buffer-create "*erc-protocol*") (save-excursion -- 2.38.1 --=-=-=--