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#67978: 29.1; ERC 5.5.0.29.1: Unnecessary .authinfo.gpg decryption causes connection failure to irc.libera.chat Date: Sat, 23 Dec 2023 08:02:11 -0800 Message-ID: <87frzslxfg.fsf__16481.8681938172$1703347421$gmane$org@neverwas.me> References: <87zfy1pm2o.fsf@neverwas.me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13506"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 67978@debbugs.gnu.org, emacs-erc@gnu.org To: Jake Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 23 17:03:34 2023 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 1rH4TO-0003Jf-Cz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Dec 2023 17:03:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rH4Sp-0001xo-Lm; Sat, 23 Dec 2023 11:02:59 -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 1rH4Sn-0001tl-9n for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 11:02:57 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rH4Sm-0000Tr-Kw for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 11:02:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rH4Sr-0006CI-O0 for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 11:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Dec 2023 16:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67978 X-GNU-PR-Package: emacs Original-Received: via spool by 67978-submit@debbugs.gnu.org id=B67978.170334734923783 (code B ref 67978); Sat, 23 Dec 2023 16:03:01 +0000 Original-Received: (at 67978) by debbugs.gnu.org; 23 Dec 2023 16:02:29 +0000 Original-Received: from localhost ([127.0.0.1]:51108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rH4SL-0006BV-2O for submit@debbugs.gnu.org; Sat, 23 Dec 2023 11:02:29 -0500 Original-Received: from mail-108-mta49.mxroute.com ([136.175.108.49]:45237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rH4SI-0006BJ-Kj for 67978@debbugs.gnu.org; Sat, 23 Dec 2023 11:02:27 -0500 Original-Received: from filter006.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta49.mxroute.com (ZoneMTA) with ESMTPSA id 18c9769afe80003727.001 for <67978@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sat, 23 Dec 2023 16:02:15 +0000 X-Zone-Loop: 47c304970543e93f9f151b268e0f31c9a37bfa3e55f6 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=1VPofS7T56OMHP4MPoRn0LTneCvBns4t0Hdqhz+V+/8=; b=LLqIle5xIPPbsXwY94I4ckUZ8V NGJ6q2w0CHrEn/WcgljJLZMPs86lTitKLdlP0LzFzlNJaO0BltrqqcAdwhmvrH0yAhBdQjBoPMtZv GsXDXnZ6caoFyMEkO3GolZ7x0T7foSU/oYgWyCJBa29k1KPBiVTaL2a/dw+Zm2Q4/TEaS8SHzecD0 8mbpJCOscCQU/+S6v6fvapOhefyVhh9mfZCrxfzqM1bEbTYeRtG7TWH4kPqpY5zEht4G6pXvRL9WK uSKdX9JU/7N3tsLpqnG95NCLRSNWQkybSY0SXYSl+lFBjXTFAHZe9EFNnoCXZyoZcHCGji5bDTPUc WFEAOVKw==; In-Reply-To: (Jake's message of "Sat, 23 Dec 2023 08:00:39 +0000") 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:276752 Archived-At: Hi Jake, Jake writes: > Hi J.P. > > Thanks for taking the time. You're very welcome. >> It just decrypts the file straight away if it has access to the key >> it was encrypted with and fails otherwise. > It sounds like you've successfully reproduced it, because it's > attempted to decrypt the auth-source file. Hard to say, but hopefully it's close enough to what you're experiencing. > Now I feel like I'm definitely missing something. Why does it do this? > I assume nothing in this file is required to connect to > irc.libera.chat, since the connection succeeds if the file is not > present. Right, nothing in the file is needed unless you've arranged for it to be. By default, ERC usually checks for server and other passwords when the protocol presents an opportunity. In most cases, there's a specific function-valued option, like `erc-auth-source-server-function', that corresponds to a given opportunity. Setting any of these options to nil typically inhibits `auth-source' queries for that particular context. So you can always resort to that as a workaround. >> So, I was wondering if this prompt is coming from somewhere external, >> such as a secrets manager or a TTY pinentry program > I've had the prompt from gnome keyring on Ubuntu (I assume that's what > it is) and gtk-pinentry on another machine. But my issue is that the > prompt occurs at all. > >> Also, is the "irc.libera.chat:6697" buffer completely blank >> after the failure? > yes it is blank. > >> And is there anything relevant recorded in the >> "*Messages*" buffer? > Decrypting /home/jake/.authinfo.gpg...done > epa-file-insert-file-contents: Opening input file: Decryption failed, > , No secret key That's helpful, thanks. I believe what's happening in your case is that your Gnome Keyring's GPG integration needs attention, hopefully only in the configuration department. If libsecret has been authorized to store the key you're being prompted to provide a passphrase for, it should show up when you query the service over DBus. But before messing with that, make sure to tick the appropriate "remember this" box the next time you provide your passphrase in a popup dialog. From then on, you shouldn't be prompted, though you may have to log out and back in for it to stick [1]. In any case, I think ERC users should be allowed to ignore errors signaled by its default `auth-source' queries, so I've added a prompt that asks whether to proceed anyway when one occurs. It's preceded by an annoying warning, which you can customize away in the usual fashion, in this case by setting the option `warning-suppress-types' or `warning-suppress-log-types' to include the list (erc auth-source). Feel free to try out the changes on HEAD [2] and report back. If that's too much trouble, you can wait for ERC 5.6, which should be released in the coming weeks. Thanks, J.P. [1] https://emacs-erc.gitlab.io/bugs/archive/doc/erc.html#Troubleshooting-1 [2] https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5fb9d6c5