From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 20 09:54:19 2020 Received: (at submit) by debbugs.gnu.org; 20 Dec 2020 14:54:19 +0000 Received: from localhost ([127.0.0.1]:44004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kr06E-0006AI-Fk for submit@debbugs.gnu.org; Sun, 20 Dec 2020 09:54:19 -0500 Received: from lists.gnu.org ([209.51.188.17]:57108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqwLv-0006ZD-Iq for submit@debbugs.gnu.org; Sun, 20 Dec 2020 05:54:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqwLu-0000jM-AC for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2020 05:54:15 -0500 Received: from out0.migadu.com ([2001:41d0:2:267::]:35924) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqwLq-0006DR-K6 for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2020 05:54:14 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lgcl.de; s=key1; t=1608461643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=Ma+Wksxqky9MxXVTt2aJBBMgdcBYzQlamdd/nWyR6KE=; b=XnZlZu9Jci8MFEPdmfaGyL2SiQs4lYljJ+M4P8u/Cuz3Fzc8RhAekR2B27SKkEqPpNJBAq 3tn17ZvFty0JSzXrmvJ9k/9zDtm+OnD9N9AwPcC06gHjBkgLLD+02KLRtVw+UdfJ0pKAqm fr91CMV1R0PEdraVmtCIRkz3+826x9Z23rpWHUktsnzvsqmu5z8IusrZ/YJBGg9f+8IiXf NdXy5epCkiTXChlDn8ywgVAeJXYvaW+U79UdjQur44h4wZlTvKG8EXkjqA0WntiNRaw7ki o8pYYLNKZrFZnbSKMy03bq79Wxf3h7HWO96tOic0vDR+qTwc9Y2EgrxEF5Q2nQ== From: Leon Vack To: bug-gnu-emacs@gnu.org Subject: erc-services.el: Auth-source support for passwords Message-ID: <87v9cw7np1.fsf@sol.hw.lgcl.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: dev@lgcl.de Date: Sun, 20 Dec 2020 10:54:03 GMT Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=dev@lgcl.de; helo=out0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 20 Dec 2020 09:54:16 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Adds an option to erc-services.el to query auth-source for NickServ passwords. This is my first patch to emacs, so please let me know if I missed any standards. I am about to start the process of assigning the copyright to the FSF. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-erc-services.el-Auth-source-support-for-passwords.patch >From 367593cc4cbfdfbdac778fd15ceb79fd61d7f64c Mon Sep 17 00:00:00 2001 From: Leon Vack Date: Sun, 20 Dec 2020 10:53:33 +0100 Subject: [PATCH] erc-services.el: Auth-source support for passwords * lisp/etc/erc-services.el (erc-nickserv-passwords): Document that the passwords are only used when erc-prompt-for-nickserv-password is nil. * lisp/etc/erc-services.el (erc-use-auth-source-for-nickserv-password): New customizable variable to enable checking auth-source for NickServ passwords. * lisp/etc/erc-services.el (etc-nickserv-get-password): New function to handle the lookup of the NickServ password from both auth-source and the erc-nickserv-passwords variable. * lisp/etc/erc-services.el (erc-nickserv-call-identify-function): Use new erc-nickserv-get-password function to lookup NickServ passwords. * lisp/etc/erc-services.el (erc-nickserv-identify-autodetect) (erc-nickserv-identify-on-connect) (erc-nickserv-identify-on-nick-change): Call erc-nickserv-call-identify-function when erc-use-auth-source-for-nickserv-password is set. --- etc/NEWS | 4 ++++ lisp/erc/erc-services.el | 50 ++++++++++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 4a8e70e6a6..c9e0fa7459 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1283,6 +1283,10 @@ https://www.w3.org/TR/xml/#charsets). Now it rejects such strings. ** erc +*** erc-services.el now supports NickServ passwords from auth-source. +The 'erc-use-auth-source-for-nickserv-password' enables querying +auth-source for NickServ passwords. + --- *** The '/ignore' command will now ask for a timeout to stop ignoring the user. Allowed inputs are seconds or ISO8601-like periods like "1h" or "4h30m". diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index c0011f9808..0710813e9d 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -168,9 +168,23 @@ erc-prompt-for-nickserv-password :group 'erc-services :type 'boolean) +(defcustom erc-use-auth-source-for-nickserv-password nil + "Query auth-source for a password when identifiying to NickServ. + + +This option has an no effect `erc-prompt-for-nickserv-password' +is not nil and passwords from `erc-nickserv-passwords' take +precedence." + :version "28.1" + :group 'erc-services + :type 'boolean) + (defcustom erc-nickserv-passwords nil "Passwords used when identifying to NickServ automatically. +`erc-prompt-for-nickserv-password' must be nil for these +passwords to be used. + Example of use: (setq erc-nickserv-passwords \\='((freenode ((\"nick-one\" . \"password\") @@ -199,7 +213,7 @@ erc-nickserv-passwords (cons :tag "Identity" (string :tag "Nick") (string :tag "Password" - :secret ?*)))))) + :secret ?*)))))) ;; Variables: @@ -375,7 +389,8 @@ erc-nickserv-identify-autodetect If `erc-prompt-for-nickserv-password' is non-nil, prompt the user for the password for this nickname, otherwise try to send it automatically." (unless (and (null erc-nickserv-passwords) - (null erc-prompt-for-nickserv-password)) + (null erc-prompt-for-nickserv-password) + (null erc-use-auth-source-for-nickserv-password)) (let* ((network (erc-network)) (sender (erc-nickserv-alist-sender network)) (identify-regex (erc-nickserv-alist-regexp network)) @@ -394,7 +409,8 @@ erc-nickserv-identify-autodetect (defun erc-nickserv-identify-on-connect (_server nick) "Identify to Nickserv after the connection to the server is established." (unless (or (and (null erc-nickserv-passwords) - (null erc-prompt-for-nickserv-password)) + (null erc-prompt-for-nickserv-password) + (null erc-use-auth-source-for-nickserv-password)) (and (eq erc-nickserv-identify-mode 'both) (erc-nickserv-alist-regexp (erc-network)))) (erc-nickserv-call-identify-function nick))) @@ -402,22 +418,38 @@ erc-nickserv-identify-on-connect (defun erc-nickserv-identify-on-nick-change (nick _old-nick) "Identify to Nickserv whenever your nick changes." (unless (or (and (null erc-nickserv-passwords) - (null erc-prompt-for-nickserv-password)) + (null erc-prompt-for-nickserv-password) + (null erc-use-auth-source-for-nickserv-password)) (and (eq erc-nickserv-identify-mode 'both) (erc-nickserv-alist-regexp (erc-network)))) (erc-nickserv-call-identify-function nick))) +(defun erc-nickserv-get-password (nickname) + "Return the password for NICKNAME from configured sources. + +It uses `erc-nickserv-passwords' and additionally auth-source +when `erc-use-auth-source-for-nickserv-password' is not nil." + (or (when erc-nickserv-passwords + (cdr (assoc nickname + (nth 1 (assoc (erc-network) + erc-nickserv-passwords))))) + (when erc-use-auth-source-for-nickserv-password + (let* ((secret (nth 0 (auth-source-search + :max 1 :require '(:secret) + :host (erc-with-server-buffer erc-session-server) + :port (format ; ensure we have a string + "%s" (erc-with-server-buffer erc-session-port)) + :user nickname)))) + (when secret (let ((passwd (plist-get secret :secret))) + (if (functionp passwd) (funcall passwd) passwd))))))) + (defun erc-nickserv-call-identify-function (nickname) "Call `erc-nickserv-identify'. Either call it interactively or run it with NICKNAME's password, depending on the value of `erc-prompt-for-nickserv-password'." (if erc-prompt-for-nickserv-password (call-interactively 'erc-nickserv-identify) - (when erc-nickserv-passwords - (erc-nickserv-identify - (cdr (assoc nickname - (nth 1 (assoc (erc-network) - erc-nickserv-passwords)))))))) + (when password (erc-nickserv-identify (erc-nickserv-get-password nickname))))) (defvar erc-auto-discard-away) -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 20 13:05:08 2020 Received: (at control) by debbugs.gnu.org; 20 Dec 2020 18:05:08 +0000 Received: from localhost ([127.0.0.1]:45578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kr34t-0006xo-Jk for submit@debbugs.gnu.org; Sun, 20 Dec 2020 13:05:08 -0500 Received: from out1.migadu.com ([91.121.223.63]:11636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kr2lw-0004Nl-Sn for control@debbugs.gnu.org; Sun, 20 Dec 2020 12:45:33 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lgcl.de; s=key1; t=1608486331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=SpmL8GHQpwN6H9hQcLGIe82FRjkfqVAZzrjBbffP8pA=; b=ePyh2NkH8LGSjNJ8CAJ0I4Gv5RsgICluZEUszVJcJ51S1ImoQ3NenHPyhf0tGGWje1s/D9 BTWNFyGERVDVMKLoau5CiAGsyDZj94o9dE9hkxwbG6ImH2DVCFsdgGpmSZoQj/zSQv+l9X kBihvB6WavFWrnmwKWf/iKT8G1XuccshRdFT/wHOHgvr9rKetuhI7g1WqVloj0R8eigHBP enNoyMZiPqBeRiJcQCKapzma9SdXnbxFXI06Wn003S5hZ81jpUcCca5YdBhMrOCQATw8jj Eb0T4m7SXAntQUXQxlk4pI/L4xqAuc+a7CioukfMtXlEXKS+9UnIpJlYs9Zvkw== From: Leon Vack To: control@debbugs.gnu.org Subject: bug#45340: erc-services.el: Auth-source support for passwords Message-ID: <87k0tc74n9.fsf@sol.hw.lgcl.de> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: dev@lgcl.de Date: Sun, 20 Dec 2020 17:45:31 GMT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-Mailman-Approved-At: Sun, 20 Dec 2020 13:05:07 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 45340 patch thanks Forgot to include [PATCH] in the submission mail's subject. My bad. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 20 23:46:40 2020 Received: (at 45340) by debbugs.gnu.org; 21 Dec 2020 04:46:40 +0000 Received: from localhost ([127.0.0.1]:45939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krD5k-0000Fn-DP for submit@debbugs.gnu.org; Sun, 20 Dec 2020 23:46:40 -0500 Received: from quimby.gnus.org ([95.216.78.240]:37024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krD5i-00009V-Oc for 45340@debbugs.gnu.org; Sun, 20 Dec 2020 23:46:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References: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=xYdpmTdOohZMUOuw0qmXDlwKVGw2uf5a4OzbbDJChfA=; b=KyPq/hsWQwSDIYTFy+kDpp2Y6V YPeMIbyC52m5cIK+vXeZEUL+aKoyzAbVTkLRfiSSk9mbFdEdnObDEhiwR8vNsOS8iQJD4ItoX5rqz Ar38T/gFMfIFJ78F4OcYRGg4DTYQDPNUUEGBjx3U6mD2bl5mhBvdi/O8i5380W9qB7eM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1krD5W-00017r-P6; Mon, 21 Dec 2020 05:46:32 +0100 From: Lars Ingebrigtsen To: Leon Vack Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords References: <87v9cw7np1.fsf@sol.hw.lgcl.de> X-Now-Playing: Steven Brown's _Music for Film & Theatre (2)_: "The Flight" Date: Mon, 21 Dec 2020 05:46:25 +0100 In-Reply-To: <87v9cw7np1.fsf@sol.hw.lgcl.de> (Leon Vack's message of "Sun, 20 Dec 2020 10:54:03 GMT") Message-ID: <877dpbhila.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Leon Vack writes: > Adds an option to erc-services.el to query auth-source for NickServ > passwords. > > This is my first patch to emacs, so please let me know if I missed any > standards. I am about to start the proce [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45340 Cc: 45340@debbugs.gnu.org, Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Leon Vack writes: > Adds an option to erc-services.el to query auth-source for NickServ > passwords. > > This is my first patch to emacs, so please let me know if I missed any > standards. I am about to start the process of assigning the copyright > to the FSF. Looks good to me; perhaps Amin (added to the Ccs) will have some comments. Have you already started the assignment process, or do you need the assignment form to get started? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 21 00:44:27 2020 Received: (at 45340) by debbugs.gnu.org; 21 Dec 2020 05:44:27 +0000 Received: from localhost ([127.0.0.1]:45981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krDzf-0002RE-6h for submit@debbugs.gnu.org; Mon, 21 Dec 2020 00:44:27 -0500 Received: from out0.migadu.com ([94.23.1.103]:7692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krDzc-0002R4-Va for 45340@debbugs.gnu.org; Mon, 21 Dec 2020 00:44:26 -0500 References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <877dpbhila.fsf@gnus.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lgcl.de; s=key1; t=1608529463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2u4zHILdtjx59yEPJuVyPZ3gh2gYeTg5zIjV7Ozmdq4=; b=jKj9gM/W9wXh9owoWIifnuYO+f+QQ5UCa+Vg7Yi3kW5b8YhtLM9ndVsNy94KckZXvbNWAS eJ/IvrWaIura1y0VD68wHnvFI3i76jd9mXK4F0/JW3d2w+GkdM8BZxSFd84pJQHDmDSfl4 ohIpUt+Gc8VgGuiUGuVQpsGh07LSr0ATqdjBZld+t8NdLx+3c7+EAdvgQVNdu1Wup18osq gqG4F9MdZjtD+tpE3knmDkW6O5Cgg9g9Lm66o/vNcEa3ly325LbKxRYt3efHueLLDN9a3I rdLTM/sTtQNPn6tKwcFhSRcMl/FJPoyvTkAGKzsD5cfhYcL3AvOSten/PICJHQ== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Leon Vack To: Lars Ingebrigtsen Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords In-reply-to: <877dpbhila.fsf@gnus.org> Message-ID: <87h7of7lxl.fsf@sol.hw.lgcl.de> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: dev@lgcl.de Date: Mon, 21 Dec 2020 05:44:23 GMT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 45340 Cc: 45340@debbugs.gnu.org, Amin Bandali , Leon Vack X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Have you already started the assignment process, or do you need the > assignment form to get started? Yes, I have the form and started the assignment process with it. Thanks for asking. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 28 19:12:59 2020 Received: (at 45340) by debbugs.gnu.org; 29 Dec 2020 00:12:59 +0000 Received: from localhost ([127.0.0.1]:37188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ku2dG-0002dg-Q4 for submit@debbugs.gnu.org; Mon, 28 Dec 2020 19:12:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ku2dB-0002dP-Ng for 45340@debbugs.gnu.org; Mon, 28 Dec 2020 19:12:56 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49408) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ku2d5-0000G9-4i; Mon, 28 Dec 2020 19:12:47 -0500 Received: from [2607:fea8:3fdf:f688:79c7:928f:c16c:52a1] (port=34478 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ku2d4-0005cF-MH; Mon, 28 Dec 2020 19:12:46 -0500 From: Amin Bandali To: Leon Vack , Lars Ingebrigtsen Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords References: <87v9cw7np1.fsf@sol.hw.lgcl.de> Date: Mon, 28 Dec 2020 19:12:44 -0500 In-Reply-To: <87v9cw7np1.fsf@sol.hw.lgcl.de> Message-ID: <874kk5jwqr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45340 Cc: 45340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello Leon, Lars, Thanks for your patch, Leon. I've left some stylistic comments below, until I get a chance to have a closer look at your patch and take it for a test run in the next week or so. :-) * * * Leon Vack writes: >> Have you already started the assignment process, or do you need the >> assignment form to get started? > > Yes, I have the form and started the assignment process with it. Thanks > for asking. Great. Please let me know when you hear from the copyright clerk about the completion of the process. * * * Leon Vack writes: > Adds an option to erc-services.el to query auth-source for NickServ > passwords. > > This is my first patch to emacs, so please let me know if I missed any > standards. I am about to start the process of assigning the copyright > to the FSF. Thanks! To begin with, please use spaces for indenting on the lines you change or the new lines you add throughout your patch. >>>From 367593cc4cbfdfbdac778fd15ceb79fd61d7f64c Mon Sep 17 00:00:00 2001 > From: Leon Vack > Date: Sun, 20 Dec 2020 10:53:33 +0100 > Subject: [PATCH] erc-services.el: Auth-source support for passwords Please rewrite the subject to conform to the conventions laid out in emacs.git's CONTRIBUTE file. Perhaps something like this: Support using auth-source for NickServ passwords in ERC > * lisp/etc/erc-services.el (erc-nickserv-passwords): Document that > the passwords are only used when erc-prompt-for-nickserv-password is > nil. > * lisp/etc/erc-services.el > (erc-use-auth-source-for-nickserv-password): New customizable > variable to enable checking auth-source for NickServ passwords. > * lisp/etc/erc-services.el (etc-nickserv-get-password): New function > to handle the lookup of the NickServ password from both auth-source > and the erc-nickserv-passwords variable. > * lisp/etc/erc-services.el (erc-nickserv-call-identify-function): > Use new erc-nickserv-get-password function to lookup NickServ > passwords. > * lisp/etc/erc-services.el (erc-nickserv-identify-autodetect) > (erc-nickserv-identify-on-connect) > (erc-nickserv-identify-on-nick-change): Call > erc-nickserv-call-identify-function when > erc-use-auth-source-for-nickserv-password is set. You don't have to repeat the "* lisp/etc/erc-services.el" at the beginning of each of those subsequent lines. You can simply start those lines with parenthesized name of the modified function/variable, followed by a colon, followed by the change description. Also, for the last entry, you can merge the multiple parenthesized names into one, like so: (erc-nickserv-identify-autodetect, erc-nickserv-identify-on-connect, erc-nickserv-identify-on-nick-change): Call ...... Lastly, please add a simple line like "* etc/NEWS: Document change." about the etc/NEWS update also. > --- > etc/NEWS | 4 ++++ > lisp/erc/erc-services.el | 50 ++++++++++++++++++++++++++++++++-------- > 2 files changed, 45 insertions(+), 9 deletions(-) > > diff --git a/etc/NEWS b/etc/NEWS > index 4a8e70e6a6..c9e0fa7459 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -1283,6 +1283,10 @@ https://www.w3.org/TR/xml/#charsets). Now it reje= cts such strings. >=20=20 > ** erc >=20=20 > +*** erc-services.el now supports NickServ passwords from auth-source. > +The 'erc-use-auth-source-for-nickserv-password' enables querying > +auth-source for NickServ passwords. > + > --- > *** The '/ignore' command will now ask for a timeout to stop ignoring th= e user. > Allowed inputs are seconds or ISO8601-like periods like "1h" or "4h30m". Please consider adding example(s) of use to the NEWS entry. > diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el > index c0011f9808..0710813e9d 100644 > --- a/lisp/erc/erc-services.el > +++ b/lisp/erc/erc-services.el > @@ -168,9 +168,23 @@ erc-prompt-for-nickserv-password > :group 'erc-services > :type 'boolean) >=20=20 > +(defcustom erc-use-auth-source-for-nickserv-password nil > + "Query auth-source for a password when identifiying to NickServ. > + > + > +This option has an no effect `erc-prompt-for-nickserv-password' ^ add missing 'if' > +is not nil and passwords from `erc-nickserv-passwords' take ^ add missing comma ',' > +precedence." > + :version "28.1" > + :group 'erc-services > + :type 'boolean) > + > (defcustom erc-nickserv-passwords nil > "Passwords used when identifying to NickServ automatically. >=20=20 > +`erc-prompt-for-nickserv-password' must be nil for these > +passwords to be used. > + > Example of use: > (setq erc-nickserv-passwords > \\=3D'((freenode ((\"nick-one\" . \"password\") > @@ -199,7 +213,7 @@ erc-nickserv-passwords > (cons :tag "Identity" > (string :tag "Nick") > (string :tag "Password" > - :secret ?*)))))) > + :secret ?*)))))) >=20=20 > ;; Variables: >=20=20 > @@ -375,7 +389,8 @@ erc-nickserv-identify-autodetect > If `erc-prompt-for-nickserv-password' is non-nil, prompt the user for the > password for this nickname, otherwise try to send it automatically." > (unless (and (null erc-nickserv-passwords) > - (null erc-prompt-for-nickserv-password)) > + (null erc-prompt-for-nickserv-password) > + (null erc-use-auth-source-for-nickserv-password)) > (let* ((network (erc-network)) > (sender (erc-nickserv-alist-sender network)) > (identify-regex (erc-nickserv-alist-regexp network)) > @@ -394,7 +409,8 @@ erc-nickserv-identify-autodetect > (defun erc-nickserv-identify-on-connect (_server nick) > "Identify to Nickserv after the connection to the server is establishe= d." > (unless (or (and (null erc-nickserv-passwords) > - (null erc-prompt-for-nickserv-password)) > + (null erc-prompt-for-nickserv-password) > + (null erc-use-auth-source-for-nickserv-password)) > (and (eq erc-nickserv-identify-mode 'both) > (erc-nickserv-alist-regexp (erc-network)))) > (erc-nickserv-call-identify-function nick))) > @@ -402,22 +418,38 @@ erc-nickserv-identify-on-connect > (defun erc-nickserv-identify-on-nick-change (nick _old-nick) > "Identify to Nickserv whenever your nick changes." > (unless (or (and (null erc-nickserv-passwords) > - (null erc-prompt-for-nickserv-password)) > + (null erc-prompt-for-nickserv-password) > + (null erc-use-auth-source-for-nickserv-password)) > (and (eq erc-nickserv-identify-mode 'both) > (erc-nickserv-alist-regexp (erc-network)))) > (erc-nickserv-call-identify-function nick))) >=20=20 > +(defun erc-nickserv-get-password (nickname) > + "Return the password for NICKNAME from configured sources. > + > +It uses `erc-nickserv-passwords' and additionally auth-source > +when `erc-use-auth-source-for-nickserv-password' is not nil." > + (or (when erc-nickserv-passwords > + (cdr (assoc nickname Strange formatting/indentation. I would prefer it if "(when erc-nickserv-passwords" started on its own line, and "(cdr (assoc nickname" on the line below it, and the region indented using spaces and properly, in a way that the lines fit the 70-character line length convention. > + (nth 1 (assoc (erc-network) > + erc-nickserv-passwords))))) > + (when erc-use-auth-source-for-nickserv-password > + (let* ((secret (nth 0 (auth-source-search > + :max 1 :require '(:secret) > + :host (erc-with-server-buffer erc-session-server) > + :port (format ; ensure we have a string > + "%s" (erc-with-server-buffer erc-session-port)) > + :user nickname)))) > + (when secret (let ((passwd (plist-get secret :secret))) > + (if (functionp passwd) (funcall passwd) passwd))))))) > + > (defun erc-nickserv-call-identify-function (nickname) > "Call `erc-nickserv-identify'. > Either call it interactively or run it with NICKNAME's password, > depending on the value of `erc-prompt-for-nickserv-password'." > (if erc-prompt-for-nickserv-password > (call-interactively 'erc-nickserv-identify) > - (when erc-nickserv-passwords > - (erc-nickserv-identify > - (cdr (assoc nickname > - (nth 1 (assoc (erc-network) > - erc-nickserv-passwords)))))))) > + (when password (erc-nickserv-identify (erc-nickserv-get-password nic= kname))))) This line is too long; please reformat. >=20=20 > (defvar erc-auto-discard-away) * * * Thanks! =2D-=20 https://bndl.org Free Software activist | GNU maintainer & webmaster GPG: BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJEBAEBCgAuFiEEObM8jZRIDS3cwqSYi0Sgzce5VvIFAl/qdHwQHGJhbmRhbGlA Z251Lm9yZwAKCRCLRKDNx7lW8okeD/40wqLCdT3KLc/29hkUa7TcsF+3DF5jvGKw LQn1bSA1bL5r70mE6dpLEnfgHVEi055n8y/xtbrhGCdRP0ywsQU4onCoiQ0e6Zou m+h5bt6UnCJRFmZ22l5JL1HVQmsfzyaaSR/pC1I8pvE0qCCWP+XqNH0sMkm7T4w/ wZhvaTwVsaB5XIIS1ZJQ1GAP+oGuAsvE8XYNE37dA/Xou2KnS+UbpRc/af/WtK3f LhVmqCNalsWoMEEo+ozNklMyyrmeRuxA/KZkUErHyiCsYdzU03A1H4lRLEAphkA8 P6ui8bYVmuW3shH0f+G3HrfTwMahfCRJtXzHsWBXvvtbFfylJlFahvuKYSxdJn5f 777KReH8pQ6Zb8wAQVaHA6lR8sJAdO9IbIwdC2VKlJ7/qJ/3B/XOhqoUKfA5JTkB L1ZevGGAmdvqIYIJ4F9iFwwqfIBh3WQSPe7L2qYlM800JMw2+AiZLjctobroPrmr butGMqYgn6JL1Ej6TGMenvDGYoPT5oS2EaJb6e1hrBWLmHwowDtaTawp023fZ9jn 30akNDeAr7Z0GE9Ze1X14mfyhWMFdwnHPR72kT4kBKkHifjLqh3PfeGSABC5TW2s H4j5IRaA6X73wXv8hTZbc+9eUHq+qKt6/cizdNVV5fpUH/OG2b81uRDY4QNav3Ka kx11xSBF1Q== =wpOV -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 29 03:24:30 2020 Received: (at 45340) by debbugs.gnu.org; 29 Dec 2020 08:24:30 +0000 Received: from localhost ([127.0.0.1]:37527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuAIv-0001w9-UJ for submit@debbugs.gnu.org; Tue, 29 Dec 2020 03:24:30 -0500 Received: from out1.migadu.com ([91.121.223.63]:34082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuAIt-0001w0-64 for 45340@debbugs.gnu.org; Tue, 29 Dec 2020 03:24:29 -0500 References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <874kk5jwqr.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lgcl.de; s=key1; t=1609230265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b7tD3G12zwDcezq+/5EPJ1qEpGGBIUF3FUAVE5KKwWc=; b=Vg44BW4yOmnoYfBOwvkYcWlE+xx+3VKc73AnTD8QWpSGa5tb7sFbim0s3qYU35ZbEYu3Gj SR1PanB1RSvjtVfbFJs8TIw9+wONTk3ykyYhDYMiViHnE8KgZiJbvWNbSkhtGhy54Xgu3V hAzjvb6lN+t36oJr2eWQmo0gC1bTj/O8q2I5xNKf7KtiTASTMKPeOqvyGefzrIjHpsYTff 6sn/vQEdNWv6esUiqsMCKSO0d9jgws19pE1HC6YizOf/t01fIOfRthcgEYNfWXi2JPLNAL REsIzDhNDEyW4amq+nTgIzKq2so6yInaUy13D2UvtfEBFpXu3p/NvsBMAwDW4g== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Leon Vack To: Amin Bandali Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords In-reply-to: <874kk5jwqr.fsf@gnu.org> Message-ID: <87h7o5vx3b.fsf@sol.hw.lgcl.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: dev@lgcl.de Date: Tue, 29 Dec 2020 08:24:25 GMT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45340 Cc: Lars Ingebrigtsen , 45340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hello Amin, > > Thanks for your patch, Leon. I've left some stylistic comments below, > until I get a chance to have a closer look at your patch and take it for > a test run in the next week or so. :-) > Thanks for the pointers. I attached a new patch with all of them addressed. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Support-using-auth-source-for-NickServ-passwords-in-.patch >From 45544bbf6b197e545297430f511bf7ca75962673 Mon Sep 17 00:00:00 2001 From: Leon Vack Date: Sun, 20 Dec 2020 10:53:33 +0100 Subject: [PATCH] Support using auth-source for NickServ passwords in ERC * lisp/etc/erc-services.el (erc-nickserv-passwords): Document that the passwords are only used when erc-prompt-for-nickserv-password is nil. * (erc-use-auth-source-for-nickserv-password): New customizable variable to enable checking auth-source for NickServ passwords. * (etc-nickserv-get-password): New function to handle the lookup of the NickServ password from both auth-source and the erc-nickserv-passwords variable. * (erc-nickserv-call-identify-function): Use new erc-nickserv-get-password function to lookup NickServ passwords. * (erc-nickserv-identify-autodetect, erc-nickserv-identify-on-connect, erc-nickserv-identify-on-nick-change): Call erc-nickserv-call-identify-function when erc-use-auth-source-for-nickserv-password is set. * etc/NEWS: Document change. --- etc/NEWS | 9 ++++++ lisp/erc/erc-services.el | 59 ++++++++++++++++++++++++++++++++-------- 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 4a8e70e6a6..d722592fd3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1283,6 +1283,15 @@ https://www.w3.org/TR/xml/#charsets). Now it rejects such strings. ** erc +*** erc-services.el now supports NickServ passwords from auth-source. +The 'erc-use-auth-source-for-nickserv-password' enables querying +auth-source for NickServ passwords. To enable this, add the following +to your init file: + + (setq erc-prompt-for-nickserv-password nil + erc-use-auth-source-for-nickserv-password t) + + --- *** The '/ignore' command will now ask for a timeout to stop ignoring the user. Allowed inputs are seconds or ISO8601-like periods like "1h" or "4h30m". diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index c0011f9808..a367873090 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -168,9 +168,23 @@ erc-prompt-for-nickserv-password :group 'erc-services :type 'boolean) +(defcustom erc-use-auth-source-for-nickserv-password nil + "Query auth-source for a password when identifiying to NickServ. + + +This option has an no effect if `erc-prompt-for-nickserv-password' +is not nil, and passwords from `erc-nickserv-passwords' take +precedence." + :version "28.1" + :group 'erc-services + :type 'boolean) + (defcustom erc-nickserv-passwords nil "Passwords used when identifying to NickServ automatically. +`erc-prompt-for-nickserv-password' must be nil for these +passwords to be used. + Example of use: (setq erc-nickserv-passwords \\='((freenode ((\"nick-one\" . \"password\") @@ -375,7 +389,8 @@ erc-nickserv-identify-autodetect If `erc-prompt-for-nickserv-password' is non-nil, prompt the user for the password for this nickname, otherwise try to send it automatically." (unless (and (null erc-nickserv-passwords) - (null erc-prompt-for-nickserv-password)) + (null erc-prompt-for-nickserv-password) + (null erc-use-auth-source-for-nickserv-password)) (let* ((network (erc-network)) (sender (erc-nickserv-alist-sender network)) (identify-regex (erc-nickserv-alist-regexp network)) @@ -394,30 +409,50 @@ erc-nickserv-identify-autodetect (defun erc-nickserv-identify-on-connect (_server nick) "Identify to Nickserv after the connection to the server is established." (unless (or (and (null erc-nickserv-passwords) - (null erc-prompt-for-nickserv-password)) - (and (eq erc-nickserv-identify-mode 'both) - (erc-nickserv-alist-regexp (erc-network)))) + (null erc-prompt-for-nickserv-password) + (null erc-use-auth-source-for-nickserv-password)) + (and (eq erc-nickserv-identify-mode 'both) + (erc-nickserv-alist-regexp (erc-network)))) (erc-nickserv-call-identify-function nick))) (defun erc-nickserv-identify-on-nick-change (nick _old-nick) "Identify to Nickserv whenever your nick changes." (unless (or (and (null erc-nickserv-passwords) - (null erc-prompt-for-nickserv-password)) - (and (eq erc-nickserv-identify-mode 'both) - (erc-nickserv-alist-regexp (erc-network)))) + (null erc-prompt-for-nickserv-password) + (null erc-use-auth-source-for-nickserv-password)) + (and (eq erc-nickserv-identify-mode 'both) + (erc-nickserv-alist-regexp (erc-network)))) (erc-nickserv-call-identify-function nick))) +(defun erc-nickserv-get-password (nickname) + "Return the password for NICKNAME from configured sources. + +It uses `erc-nickserv-passwords' and additionally auth-source +when `erc-use-auth-source-for-nickserv-password' is not nil." + (or + (when erc-nickserv-passwords + (cdr (assoc nickname + (nth 1 (assoc (erc-network) + erc-nickserv-passwords))))) + + (when erc-use-auth-source-for-nickserv-password + (let* ((secret (nth 0 (auth-source-search + :max 1 :require '(:secret) + :host (erc-with-server-buffer erc-session-server) + :port (format ; ensure we have a string + "%s" (erc-with-server-buffer erc-session-port)) + :user nickname)))) + (when secret (let ((passwd (plist-get secret :secret))) + (if (functionp passwd) (funcall passwd) passwd))))))) + (defun erc-nickserv-call-identify-function (nickname) "Call `erc-nickserv-identify'. Either call it interactively or run it with NICKNAME's password, depending on the value of `erc-prompt-for-nickserv-password'." (if erc-prompt-for-nickserv-password (call-interactively 'erc-nickserv-identify) - (when erc-nickserv-passwords - (erc-nickserv-identify - (cdr (assoc nickname - (nth 1 (assoc (erc-network) - erc-nickserv-passwords)))))))) + (when password (erc-nickserv-identify + (erc-nickserv-get-password nickname))))) (defvar erc-auto-discard-away) -- 2.28.0 --=-=-= Content-Type: text/plain >>> Have you already started the assignment process, or do you need the >>> assignment form to get started? >> >> Yes, I have the form and started the assignment process with it. Thanks >> for asking. > > Great. Please let me know when you hear from the copyright clerk about > the completion of the process. > I have already sent the singed paperwork and will let you know once I have the copy singed by the FSF. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 09 02:22:09 2021 Received: (at 45340) by debbugs.gnu.org; 9 Jan 2021 07:22:09 +0000 Received: from localhost ([127.0.0.1]:51151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ky8Zc-0002Un-UV for submit@debbugs.gnu.org; Sat, 09 Jan 2021 02:22:09 -0500 Received: from out0.migadu.com ([94.23.1.103]:13564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ky8Za-0002Ue-Kc for 45340@debbugs.gnu.org; Sat, 09 Jan 2021 02:22:08 -0500 References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <874kk5jwqr.fsf@gnu.org> <87h7o5vx3b.fsf@sol.hw.lgcl.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lgcl.de; s=key1; t=1610176925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=878O9LxyzkPKonbeoIHk8i6SKpG/tTJ1UROCLo2J1uk=; b=O+YRGwfjxU9nLJPkxK/nxJ04YxRcudj8S1zvmHTSLco/7H5djDgS7CS9FlUD7Httmp79TG tzdOt/SJNHmPdoEHkhK2+0+VjgwmulBrj1fs2b10BqnMKO6EMQ50YAs98BL1TjmjgGfHcn FY9sNff6HvXXtarKk9rBATiSEeSGzvUQX5QxW4pWnRiOjFz8oKwwBhjOp6MjNytajTkKeV 7wJ4EaKWa0Vj/p8POaLvaVsi1JxEXyI4ooD1ZqDl0NeB/zouNzaIV9pbi16hrYIV5Y2flv 2rZhFBCYzhV22JJh38xdp/pEaVs0AtOUnMriW9HiExbpTNeb3A4Xa+ic7GbLZg== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Leon Vack To: Leon Vack Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords In-reply-to: <87h7o5vx3b.fsf@sol.hw.lgcl.de> Message-ID: <8735zainhf.fsf@sol.hw.lgcl.de> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: dev@lgcl.de Date: Sat, 09 Jan 2021 07:22:05 GMT X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >>>> Have you already started the assignment process, or do you need the >>>> assignment form to get started? >>> >>> Yes, I have the form and started the assignment process with it. Thanks >>> for as [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [94.23.1.103 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [94.23.1.103 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.8 TO_EQ_FM_DIRECT_MX To == From and direct-to-MX X-Debbugs-Envelope-To: 45340 Cc: Lars Ingebrigtsen , 45340@debbugs.gnu.org, Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>> Have you already started the assignment process, or do you need the >>>> assignment form to get started? >>> >>> Yes, I have the form and started the assignment process with it. Thanks >>> for asking. >> >> Great. Please let me know when you hear from the copyright clerk about >> the completion of the process. >> > > I have already sent the singed paperwork and will let you know once I > have the copy singed by the FSF. I have now received the paperwork countersigned by the FSF. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 10 06:50:13 2021 Received: (at 45340) by debbugs.gnu.org; 10 Jan 2021 11:50:13 +0000 Received: from localhost ([127.0.0.1]:53246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyZEa-0006G2-U6 for submit@debbugs.gnu.org; Sun, 10 Jan 2021 06:50:13 -0500 Received: from quimby.gnus.org ([95.216.78.240]:39986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyZEZ-0006Fi-2Z for 45340@debbugs.gnu.org; Sun, 10 Jan 2021 06:50:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References: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=uQpU09vEHtUxvn1Afd4WdaYc+FcfvxgmgKmYkCAwmoc=; b=DwWQzNhsTOVoqPdNWfDo6cDGeq 7oR+nYpolS+ZINf3D5jHEavYpRbGyyUjDK4B+2DpRLkiv0s7cqBKk3WG7YsV8MsfGQo0Hi0Js1ydn 0Mh5yfT+yBr85KB2jrNd3IEd01JEQAamL6FfwEexYw8ffHq3WOM6AGT4FJYe2QHRaEgs=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyZEM-0006Dz-M1; Sun, 10 Jan 2021 12:50:04 +0100 From: Lars Ingebrigtsen To: Leon Vack Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <874kk5jwqr.fsf@gnu.org> <87h7o5vx3b.fsf@sol.hw.lgcl.de> X-Now-Playing: Sugarcubes's _Life's Too Good_: "Birthday" Date: Sun, 10 Jan 2021 12:49:57 +0100 In-Reply-To: <87h7o5vx3b.fsf@sol.hw.lgcl.de> (Leon Vack's message of "Tue, 29 Dec 2020 08:24:25 GMT") Message-ID: <87eeitvwnu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Leon Vack writes: > Thanks for the pointers. I attached a new patch with all of them addressed. This leads to the following warning: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45340 Cc: 45340@debbugs.gnu.org, Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Leon Vack writes: > Thanks for the pointers. I attached a new patch with all of them addressed. This leads to the following warning: In erc-nickserv-call-identify-function: erc/erc-services.el:454:11: Warning: reference to free variable `password' And the code in that function doesn't look correct to me... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 11 09:38:09 2021 Received: (at 45340) by debbugs.gnu.org; 11 Jan 2021 14:38:09 +0000 Received: from localhost ([127.0.0.1]:56219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyyKe-0003ZZ-UU for submit@debbugs.gnu.org; Mon, 11 Jan 2021 09:38:09 -0500 Received: from out0.migadu.com ([94.23.1.103]:38068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyyKa-0003ZJ-RQ for 45340@debbugs.gnu.org; Mon, 11 Jan 2021 09:38:08 -0500 References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <874kk5jwqr.fsf@gnu.org> <87h7o5vx3b.fsf@sol.hw.lgcl.de> <87eeitvwnu.fsf@gnus.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lgcl.de; s=key1; t=1610375882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t3rTRn423+UsnO6lz3yjSNd5TRvuOIf5qu486q4Qp+s=; b=WLqEZnduvE4turI5UTvVgur6r+t5mr8zAiKPNuOqSaxhJyeB0ZPXeMkKXJaN8kKDyW4jq8 dZ/jFaoh2r/qPY9qYkDXE37XNUz6ivbYmQgFfdBIsg4C2/+EaIz15puGg/Vw0RWA9ExOHD r/KGHfl/lt3grG6Qg1zfaILcp0YbFXV6TIXEWt56DmI+CVCdJIRdsgq8ALrWW1TbVppNvb IL7YLN1oDxPZfhH01OfdYlzDQFmY1pjAvt70As3nMCHOavjaJ+baaJhJVc5zGf78Gh2sLb PqLZ+F2DjwGaDx0jhLXSCO3NlYxuO1fTaNWEH4zUGeKWq4MDxdabDHCG8bSEjg== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Leon Vack To: Lars Ingebrigtsen Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords In-reply-to: <87eeitvwnu.fsf@gnus.org> Message-ID: <87wnwjk08m.fsf@sol.hw.lgcl.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: dev@lgcl.de Date: Mon, 11 Jan 2021 14:38:02 GMT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45340 Cc: 45340@debbugs.gnu.org, Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Leon Vack writes: > >> Thanks for the pointers. I attached a new patch with all of them addressed. > > This leads to the following warning: > > In erc-nickserv-call-identify-function: > erc/erc-services.el:454:11: Warning: reference to free variable `password' > > And the code in that function doesn't look correct to me... Yes, that is a mistake on my part, it must have slipped through from an earlier implementation I wrote and used. Sorry about that. I have fixed that in the attached patch and done some testing (without changing anything after it this time). --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Support-using-auth-source-for-NickServ-passwords-in-.patch >From 02d6ddfe3b07a793855dd87ea0d9ba4daee8af3f Mon Sep 17 00:00:00 2001 From: Leon Vack Date: Sun, 20 Dec 2020 10:53:33 +0100 Subject: [PATCH] Support using auth-source for NickServ passwords in ERC * lisp/etc/erc-services.el (erc-nickserv-passwords): Document that the passwords are only used when erc-prompt-for-nickserv-password is nil. * (erc-use-auth-source-for-nickserv-password): New customizable variable to enable checking auth-source for NickServ passwords. * (etc-nickserv-get-password): New function to handle the lookup of the NickServ password from both auth-source and the erc-nickserv-passwords variable. * (erc-nickserv-call-identify-function): Use new erc-nickserv-get-password function to lookup NickServ passwords. * (erc-nickserv-identify-autodetect, erc-nickserv-identify-on-connect, erc-nickserv-identify-on-nick-change): Call erc-nickserv-call-identify-function when erc-use-auth-source-for-nickserv-password is set. * etc/NEWS: Document change. --- etc/NEWS | 9 ++++++ lisp/erc/erc-services.el | 59 ++++++++++++++++++++++++++++++++-------- 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 4a8e70e6a6..d722592fd3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1283,6 +1283,15 @@ https://www.w3.org/TR/xml/#charsets). Now it rejects such strings. ** erc +*** erc-services.el now supports NickServ passwords from auth-source. +The 'erc-use-auth-source-for-nickserv-password' enables querying +auth-source for NickServ passwords. To enable this, add the following +to your init file: + + (setq erc-prompt-for-nickserv-password nil + erc-use-auth-source-for-nickserv-password t) + + --- *** The '/ignore' command will now ask for a timeout to stop ignoring the user. Allowed inputs are seconds or ISO8601-like periods like "1h" or "4h30m". diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index c0011f9808..60c7852edf 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -168,9 +168,23 @@ erc-prompt-for-nickserv-password :group 'erc-services :type 'boolean) +(defcustom erc-use-auth-source-for-nickserv-password nil + "Query auth-source for a password when identifiying to NickServ. + + +This option has an no effect if `erc-prompt-for-nickserv-password' +is not nil, and passwords from `erc-nickserv-passwords' take +precedence." + :version "28.1" + :group 'erc-services + :type 'boolean) + (defcustom erc-nickserv-passwords nil "Passwords used when identifying to NickServ automatically. +`erc-prompt-for-nickserv-password' must be nil for these +passwords to be used. + Example of use: (setq erc-nickserv-passwords \\='((freenode ((\"nick-one\" . \"password\") @@ -375,7 +389,8 @@ erc-nickserv-identify-autodetect If `erc-prompt-for-nickserv-password' is non-nil, prompt the user for the password for this nickname, otherwise try to send it automatically." (unless (and (null erc-nickserv-passwords) - (null erc-prompt-for-nickserv-password)) + (null erc-prompt-for-nickserv-password) + (null erc-use-auth-source-for-nickserv-password)) (let* ((network (erc-network)) (sender (erc-nickserv-alist-sender network)) (identify-regex (erc-nickserv-alist-regexp network)) @@ -394,30 +409,49 @@ erc-nickserv-identify-autodetect (defun erc-nickserv-identify-on-connect (_server nick) "Identify to Nickserv after the connection to the server is established." (unless (or (and (null erc-nickserv-passwords) - (null erc-prompt-for-nickserv-password)) - (and (eq erc-nickserv-identify-mode 'both) - (erc-nickserv-alist-regexp (erc-network)))) + (null erc-prompt-for-nickserv-password) + (null erc-use-auth-source-for-nickserv-password)) + (and (eq erc-nickserv-identify-mode 'both) + (erc-nickserv-alist-regexp (erc-network)))) (erc-nickserv-call-identify-function nick))) (defun erc-nickserv-identify-on-nick-change (nick _old-nick) "Identify to Nickserv whenever your nick changes." (unless (or (and (null erc-nickserv-passwords) - (null erc-prompt-for-nickserv-password)) - (and (eq erc-nickserv-identify-mode 'both) - (erc-nickserv-alist-regexp (erc-network)))) + (null erc-prompt-for-nickserv-password) + (null erc-use-auth-source-for-nickserv-password)) + (and (eq erc-nickserv-identify-mode 'both) + (erc-nickserv-alist-regexp (erc-network)))) (erc-nickserv-call-identify-function nick))) +(defun erc-nickserv-get-password (nickname) + "Return the password for NICKNAME from configured sources. + +It uses `erc-nickserv-passwords' and additionally auth-source +when `erc-use-auth-source-for-nickserv-password' is not nil." + (or + (when erc-nickserv-passwords + (cdr (assoc nickname + (nth 1 (assoc (erc-network) + erc-nickserv-passwords))))) + (when erc-use-auth-source-for-nickserv-password + (let* ((secret (nth 0 (auth-source-search + :max 1 :require '(:secret) + :host (erc-with-server-buffer erc-session-server) + :port (format ; ensure we have a string + "%s" (erc-with-server-buffer erc-session-port)) + :user nickname)))) + (when secret + (let ((passwd (plist-get secret :secret))) + (if (functionp passwd) (funcall passwd) passwd))))))) + (defun erc-nickserv-call-identify-function (nickname) "Call `erc-nickserv-identify'. Either call it interactively or run it with NICKNAME's password, depending on the value of `erc-prompt-for-nickserv-password'." (if erc-prompt-for-nickserv-password (call-interactively 'erc-nickserv-identify) - (when erc-nickserv-passwords - (erc-nickserv-identify - (cdr (assoc nickname - (nth 1 (assoc (erc-network) - erc-nickserv-passwords)))))))) + (erc-nickserv-identify (erc-nickserv-get-password nickname)))) (defvar erc-auto-discard-away) @@ -451,6 +485,7 @@ erc-nickserv-identify (provide 'erc-services) + ;;; erc-services.el ends here ;; ;; Local Variables: -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 11 09:52:00 2021 Received: (at 45340) by debbugs.gnu.org; 11 Jan 2021 14:52:00 +0000 Received: from localhost ([127.0.0.1]:56291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyyY4-0003yS-4H for submit@debbugs.gnu.org; Mon, 11 Jan 2021 09:52:00 -0500 Received: from quimby.gnus.org ([95.216.78.240]:53824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyyY1-0003yA-Px for 45340@debbugs.gnu.org; Mon, 11 Jan 2021 09:51:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References: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=lltLq18AzVAbFh2oWJNGhR8u+GDRxQKNI/mVGqRXs1o=; b=OTYRBebn0/7Pdxn7KH0MU6rNgi 1pcDIgP9j1dJmrZnYLMBqJ7ZXnRyW9WfKfGqx8l00bJW6v/Gjm0DLdTDzB0DEuvmPwhH/0fXBbo/E m92fNqR/VLZIsw+ob++RdSA0T8YXSNDhmzTD9TQPQL6Zi+FFV0LTgSZm8rhFEPchUgM0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyyXs-0007sq-Fu; Mon, 11 Jan 2021 15:51:50 +0100 From: Lars Ingebrigtsen To: Leon Vack Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <874kk5jwqr.fsf@gnu.org> <87h7o5vx3b.fsf@sol.hw.lgcl.de> <87eeitvwnu.fsf@gnus.org> <87wnwjk08m.fsf@sol.hw.lgcl.de> X-Now-Playing: Felix Da Housecat's _Kittenz and The Glitz_: "Walk withMe" Date: Mon, 11 Jan 2021 15:51:47 +0100 In-Reply-To: <87wnwjk08m.fsf@sol.hw.lgcl.de> (Leon Vack's message of "Mon, 11 Jan 2021 14:38:02 GMT") Message-ID: <87lfczh6gs.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Leon Vack writes: > Yes, that is a mistake on my part, it must have slipped through from an > earlier implementation I wrote and used. Sorry about that. > > I have fixed that in the attached patch and done some testing [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45340 Cc: 45340@debbugs.gnu.org, Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Leon Vack writes: > Yes, that is a mistake on my part, it must have slipped through from an > earlier implementation I wrote and used. Sorry about that. > > I have fixed that in the attached patch and done some testing (without > changing anything after it this time). Thanks; looks good to me, so I've pushed it to Emacs 28. Should there be something in the erc manual, though? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 11 11:04:49 2021 Received: (at 45340) by debbugs.gnu.org; 11 Jan 2021 16:04:49 +0000 Received: from localhost ([127.0.0.1]:58027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyzgX-0004Lr-JC for submit@debbugs.gnu.org; Mon, 11 Jan 2021 11:04:49 -0500 Received: from out0.migadu.com ([94.23.1.103]:5060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyzgT-0004Ld-SB for 45340@debbugs.gnu.org; Mon, 11 Jan 2021 11:04:48 -0500 References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <874kk5jwqr.fsf@gnu.org> <87h7o5vx3b.fsf@sol.hw.lgcl.de> <87eeitvwnu.fsf@gnus.org> <87wnwjk08m.fsf@sol.hw.lgcl.de> <87lfczh6gs.fsf@gnus.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lgcl.de; s=key1; t=1610381084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6Ol7rnLb+w9+PsFuvRax68MoUs8hKPJ36fJWOk35T30=; b=X0gIHzlD1p86k7z243FwQU25nOZVQ/Ac2i8Z++KxYHo0CgZ1mE1PHz6EauUEl6wmraBYtd hfdQs8BDiZ/I8G/E98yYAetRbVPsJcysaptBQZxIiNrkAXuhvjMKKlsagnxNhJZpoo0GBX vqwqEmC00ALkyOp/LTqX15vRzYPwRPAuDR0yCa2fpVxMXdxeHJpZ7HCm0E0tXI/YrVVwql yawy977xhzhOg++sAcw00DL+1TV4hnjZK3aIlLsOJqEzZ8crgT6sKf946yl6N4w3IHxYxZ zzTaJRCe8Pnwujb+6OQRXnHmZqEBSmxbS9fmgrxH/w3kuQuTLiG+RCRoaS9lkw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Leon Vack To: Lars Ingebrigtsen Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords In-reply-to: <87lfczh6gs.fsf@gnus.org> Message-ID: <87turnjw84.fsf@sol.hw.lgcl.de> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: dev@lgcl.de Date: Mon, 11 Jan 2021 16:04:44 GMT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45340 Cc: 45340@debbugs.gnu.org, Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Thanks; looks good to me, so I've pushed it to Emacs 28. Should there > be something in the erc manual, though? I am happy to have my first contribution pushed! About documentation, I would have added to the manual, if there was anything substantial about erc-services or ERC's NickServ capabilities. It is only mentioned in the list of modules with a one sentence explanation of what it does and no options are documented. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 11 11:06:49 2021 Received: (at 45340) by debbugs.gnu.org; 11 Jan 2021 16:06:49 +0000 Received: from localhost ([127.0.0.1]:58047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyziT-0004R9-Ge for submit@debbugs.gnu.org; Mon, 11 Jan 2021 11:06:49 -0500 Received: from quimby.gnus.org ([95.216.78.240]:55008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyziS-0004Qu-Es for 45340@debbugs.gnu.org; Mon, 11 Jan 2021 11:06:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References: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=vKDKHBYFRBHe+ZEN4+uwtZs4ZhmL1ZHXJ6kQtSX7kiY=; b=MvdCA2z9WQ0l/W4QzkQZfQNMew Y6APYd04Q4GH8A8905pedxC2syzz3rXhXngcHL3AjjRvCVEGDXRoe9vS6nyAwSikpRqQtEYLlFokR WT0dPwZFc3FtTWDTGAwrHtBJ/YaNcSeGNawGQs2x63g+Mk9RFYmiNdzGVBFjBmp6Wilc=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyziJ-0000LO-F1; Mon, 11 Jan 2021 17:06:41 +0100 From: Lars Ingebrigtsen To: Leon Vack Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <874kk5jwqr.fsf@gnu.org> <87h7o5vx3b.fsf@sol.hw.lgcl.de> <87eeitvwnu.fsf@gnus.org> <87wnwjk08m.fsf@sol.hw.lgcl.de> <87lfczh6gs.fsf@gnus.org> <87turnjw84.fsf@sol.hw.lgcl.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXCtc1nbXvMnzn/ //8PiQQoAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UBCxAFDubV9BIAAAFVSURBVCjPTdG9asMwEADg U9CV0K1gBbqnQ9/CKVaHTlbxmcZTKaRgP0Uz5A2iQMcMHnRP2TvZTSLwz6ez7nQyWChg83KoYRoI xvtSXoxeFVjUWae3SqMySXAdWN/AlflOec5qAiCavvYZW6+hwuUsREEeoZpBJdBGwxvvQ1c6qgoJ WMfjoBFNgy0z/wD5jDcF5gIF3l8BsJrhJySCOYLMxwsWzF3MpSfwCPgwIylgysYnPpQI2IAF2AeO Akdg11bXCnqCZWGfGqIlwihNwToIGM241WOjlgbem10vmT+fJcBn0/d6do8hSFmTetnG0dRNxk7a br5Iek3I+tnp3VMaBBK5+5WaaeCMVT/BKyBSQ6njKO3C4iwYOk5RkSgoWPtZjFRjN8MRtdi1rGcg Jy5bbmW5oJYA71/jTqE/ZzhFfbQKraqjUWzjhA+g/zESX9Byc4vj9x8P+JinKaaLEwAAACV0RVh0 ZGF0ZTpjcmVhdGUAMjAyMS0wMS0xMVQxNjowNToxMyswMDowMMMZN1QAAAAldEVYdGRhdGU6bW9k aWZ5ADIwMjEtMDEtMTFUMTY6MDU6MTMrMDA6MDCyRI/oAAAAAElFTkSuQmCC X-Now-Playing: Global Method's _Fabric Presents: Octo Octa & Eris Drew_: "Good Life (Orbital Mix)" Date: Mon, 11 Jan 2021 17:06:38 +0100 In-Reply-To: <87turnjw84.fsf@sol.hw.lgcl.de> (Leon Vack's message of "Mon, 11 Jan 2021 16:04:44 GMT") Message-ID: <8735z7e9v5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Leon Vack writes: > About documentation, I would have added to the manual, if there was > anything substantial about erc-services or ERC's NickServ > capabilities. It is only mentioned in the list of modules with a one [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45340 Cc: 45340@debbugs.gnu.org, Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Leon Vack writes: > About documentation, I would have added to the manual, if there was > anything substantial about erc-services or ERC's NickServ > capabilities. It is only mentioned in the list of modules with a one > sentence explanation of what it does and no options are documented. Ah, right, so I guess there's nothing more here to be done. Thanks for checking. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 11 11:07:01 2021 Received: (at control) by debbugs.gnu.org; 11 Jan 2021 16:07:01 +0000 Received: from localhost ([127.0.0.1]:58050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyzie-0004RX-Ol for submit@debbugs.gnu.org; Mon, 11 Jan 2021 11:07:01 -0500 Received: from quimby.gnus.org ([95.216.78.240]:55022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyzic-0004RJ-Jv for control@debbugs.gnu.org; Mon, 11 Jan 2021 11:06:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YXXaq/myGNvlGYvzkfoFCRODP/ojqFrLnZvv9d5E8JU=; b=nOwEJEd0JTExm4U8L8aHvujhUO UHHL16CMbAG9OCHXaUA+49PiQNl8hGqvtlXSGmvyMc6V2sg1TgfNBOCHtFjsvvIcPfLykqNes7kkp I9hFPNQtgYw+kjwNx83AXfkJbtQhPJwhzFnZlRentQtPryuSpIepnQN7awcHZMo8Atds=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyziU-0000La-2w for control@debbugs.gnu.org; Mon, 11 Jan 2021 17:06:52 +0100 Date: Mon, 11 Jan 2021 17:06:48 +0100 Message-Id: <871rere9uv.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #45340 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 45340 fixed close 45340 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 45340 fixed close 45340 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 03:27:38 2021 Received: (at 45340) by debbugs.gnu.org; 13 Jan 2021 08:27:38 +0000 Received: from localhost ([127.0.0.1]:34199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzbVC-0005B3-Ml for submit@debbugs.gnu.org; Wed, 13 Jan 2021 03:27:38 -0500 Received: from mail-ed1-f48.google.com ([209.85.208.48]:35232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzbVA-0005Ar-L5 for 45340@debbugs.gnu.org; Wed, 13 Jan 2021 03:27:37 -0500 Received: by mail-ed1-f48.google.com with SMTP id u19so964651edx.2 for <45340@debbugs.gnu.org>; Wed, 13 Jan 2021 00:27:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=nr9vJZx5XcfOulXcZdGzXx2jEPRb4LGzTUtC1l+vBR0=; b=h+3EkZW1zzXC0JwLchNnXCKunFh1T8IqVFav933SRMCmrvWLasVv96GLcaDZn8Zs2q Xm+AGy3fCRSU0W3VLrQeXN/NLRlnW5DodSslc9x1GK70URxLS2LxzU48gfg24N0s5PI0 KJwqgKQ/b3h5NAv3vKSRxCu17950k/wSNLwWOFIoGeTt9Ae4o5OAp4ngzmGVEDqx3X4k wKMaKIJDuNMiwPfn1y3s0xZLVoi/ER2K3++dVl6VHVZDm5Jct0I4ARhmzCZ8p8HxC1f0 5y9i/XWXA8enOlzGuMr+eOJm2WNOTx2cJk9Uj3YyO52CUXpXMTDrJwXlTwxQ9wx3jyHH 4Kew== 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=nr9vJZx5XcfOulXcZdGzXx2jEPRb4LGzTUtC1l+vBR0=; b=qtgnDQcKKI8amweOwfq8f/qxWlh3hbUz4n5Q+nenuOPoPnh1sQ+B1Em+cOz3+qanLi t1vGc0WYSnc7vM7vKY8LuKcnpd2MwbA1FyenzXK8TyHeZaand7ChhpCJB5kb3hnjJy2h ska3OV/v888HffiVw7iwum4M+tDFc40naaXeXPOnnpSXPXoi52cIUjEGeimR+AONfZsK IaL4F0pbdVqCOq6K24A9rhkzrEeEHlMtndPDFAdCukwojEtKTpFrIK2bJjeIsUG/r1W4 KhgYv6W0OfRgAJodb7ghkdNmcJXlnOAD9SUGLSYegNo81UKem8K5QBD1eHqB9PbFdJKS rwcg== X-Gm-Message-State: AOAM533gEmhvkfuAN2Z7Dm3s7IWV/VmEmwbC5Y3TJ54a27exs4GY0UX2 K+IMcVPD7D2xjqEFqvMwrKEKtvDNB8XwXnUkhjMRx4BIpTXy6A== X-Google-Smtp-Source: ABdhPJx5IIcsPIKD0vDA3xzVAgylJRMZyiJVEHYknuqaGktspm8BPfbCWt1tRVN3+iw3il4zK5RnbFkCAEnnunoS/AI= X-Received: by 2002:a50:e80c:: with SMTP id e12mr826993edn.288.1610526450773; Wed, 13 Jan 2021 00:27:30 -0800 (PST) MIME-Version: 1.0 From: Richard Copley Date: Wed, 13 Jan 2021 08:27:05 +0000 Message-ID: Subject: foo To: 45340@debbugs.gnu.org, Leon Vack Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45340 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) https://git.savannah.gnu.org/cgit/emacs.git/diff/lisp/window.el?id=42e72f4adee8809ed754a14e11e058f40b337f78 From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 15 04:46:21 2021 Received: (at submit) by debbugs.gnu.org; 15 Jan 2021 09:46:21 +0000 Received: from localhost ([127.0.0.1]:39923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0LgS-00009C-Q2 for submit@debbugs.gnu.org; Fri, 15 Jan 2021 04:46:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:56126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0LgQ-000095-UW for submit@debbugs.gnu.org; Fri, 15 Jan 2021 04:46:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0LgQ-0005D3-Ms for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2021 04:46:18 -0500 Received: from smtp6-g21.free.fr ([212.27.42.6]:61334) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0LgK-0006bd-S9; Fri, 15 Jan 2021 04:46:18 -0500 Received: from ravel.localnet (unknown [90.116.215.75]) (Authenticated sender: ocert.dev@free.fr) by smtp6-g21.free.fr (Postfix) with ESMTPSA id 0A624780371; Fri, 15 Jan 2021 10:46:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1610703970; bh=VZqYJE+bF74R12cf23oZmgKGjFaH8mjjcYmJQV9Hao4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hMfWD8D83RvgEAUnym5uvlvBv74BPLHSrFszC10EieUwcSR9xbOK29Ye4xtl00mtI Z5w54drvNRZrW9LGVy9wB6ugmeOwQ2wvB9R/lhBpCezeZ64wSPDiGS3rragZoOkz1j bMGTtVXeV3btYx7kIcDr/RhfS9TRrbEPy1vAO11mxD+aQ1iuSLLtCUbX9jfmk7HMBc 2DxXVMIJUE+J36UzHleYO1yogGiUMe9boZycrZJniiiCG3dHX4SqOQk5G0oML7mf8U Es0waxvagipx/5Mlp7+UbPefPx2QdFc1Prn5jMDp6LGbwYhDtlWiUjYqedxEZ6Sefb wI5mssNO5RSTg== From: Olivier Certner To: Leon Vack , bug-gnu-emacs@gnu.org Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords Date: Fri, 15 Jan 2021 10:46:00 +0100 Message-ID: <4311421.VgBTkc7HA1@ravel> In-Reply-To: <8735z7e9v5.fsf@gnus.org> References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <87turnjw84.fsf@sol.hw.lgcl.de> <8735z7e9v5.fsf@gnus.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Received-SPF: none client-ip=212.27.42.6; envelope-from=ocert.dev@free.fr; helo=smtp6-g21.free.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Lars Ingebrigtsen , 45340@debbugs.gnu.org, Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Sorry to be late to the party, but what is exactly this bug (and the patch) about? I'm asking this because I've been using auth source for NickServ passwords for a while now, without any patch. And I just want to make sure that this is going to continue to work (of course, I don't mind possibly changing some configuration variables if required). I've skimmed through the bug report and the patch, and while I see no particular problem there, I wonder if some existing things have not been overlooked. I have `erc-prompt-for-password' set to nil (not `erc-prompt-for-nickserv- password'), and indeed I get prompted for a NickServ password. At this point, I just hit ENTER without entering anything, and my password from auth source is automatically picked up. So there seems to be an already existing mechanism for getting the password used for NickServ from auth source. Or is it a confusion on my part, and the introduced functionality is in fact different? Regards. -- Olivier Certner From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 15 06:10:22 2021 Received: (at submit) by debbugs.gnu.org; 15 Jan 2021 11:10:22 +0000 Received: from localhost ([127.0.0.1]:39998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0Mzl-0004JS-IW for submit@debbugs.gnu.org; Fri, 15 Jan 2021 06:10:22 -0500 Received: from lists.gnu.org ([209.51.188.17]:45538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0Mzi-0004JI-At for submit@debbugs.gnu.org; Fri, 15 Jan 2021 06:10:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Mzi-0000gb-5i for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2021 06:10:18 -0500 Received: from out1.migadu.com ([2001:41d0:2:863f::]:42174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Mzf-00030m-9b; Fri, 15 Jan 2021 06:10:17 -0500 References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <87turnjw84.fsf@sol.hw.lgcl.de> <8735z7e9v5.fsf@gnus.org> <4311421.VgBTkc7HA1@ravel> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lgcl.de; s=key1; t=1610709009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=J5a1ijhIeV8GdZsqyKc3iDX2Jr9dL8OzKUGzoXH6MWw=; b=CgjIhZFDKiwl2bK7Iw4AbkWnVJ56Ocfg3cYTypDQThtAhR9SOl9dXw7XTbhDBMwIcmkb3C 3za+ahNgGuuJaDVX6ndSlNbdNcPYNo/fg53dK45wiirZCm7bG7AhHaDGA4iHRg9ni8hzMb mdFdtUScFQl2Csx76RSTeSHbPPYiDQtivtjtvfzX4Kyqw1xXn6Hl+FifH/euSGezlM3WHh YgIasg3zk+0fADIUvREfdgfxwz6pbe9ex6CnTwm3emhzePEd5xsFNaCAMdoTRe5XOSwXbC UnBKJ2TWW3NUtWrUE3nhGocIV+SPrJfnbR+Wi6co8QPmCzyAESvbxwMKroeXiQ== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Leon Vack To: Olivier Certner Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords In-reply-to: <4311421.VgBTkc7HA1@ravel> Message-ID: <87mtxalals.fsf@sol.hw.lgcl.de> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: dev@lgcl.de Date: Fri, 15 Jan 2021 11:10:08 GMT Received-SPF: pass client-ip=2001:41d0:2:863f::; envelope-from=dev@lgcl.de; helo=out1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org, 45340@debbugs.gnu.org, Amin Bandali , Lars Ingebrigtsen , Leon Vack X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Olivier Certner writes: > Hi, > Hello, > Sorry to be late to the party, but what is exactly this bug (and the patch) > about? I'm asking this because I've been using auth source for NickServ > passwords for a while now, without any patch. And I just want to make sure > that this is going to continue to work (of course, I don't mind possibly > changing some configuration variables if required). I've skimmed through the > bug report and the patch, and while I see no particular problem there, I > wonder if some existing things have not been overlooked. > > I have `erc-prompt-for-password' set to nil (not `erc-prompt-for-nickserv- > password'), and indeed I get prompted for a NickServ password. At this point, > I just hit ENTER without entering anything, and my password from auth source > is automatically picked up. So there seems to be an already existing mechanism > for getting the password used for NickServ from auth source. I was not aware of this, but I have done some debugging and the NickServ authentication you use mostly likely does not go through erc-services, but the core erc functionality to connect, which sends a PASS command with a password from auth source. At least freenode accepts this as a way to do NickServ authentication and the patch does not effect this functionality at all. To check if that is indeed the case, maybe try connecting without having the erc-services module loaded. > > Or is it a confusion on my part, and the introduced functionality is in fact > different? > This patch introduces a different functionality as described above, as erc-services, which only handles authentication with actual /nickserv identify commands (not handled by the core connect functionality), did not query auth source before this patch. > Regards. Regards, Leon Vack From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 15 07:41:40 2021 Received: (at submit) by debbugs.gnu.org; 15 Jan 2021 12:41:40 +0000 Received: from localhost ([127.0.0.1]:40106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0OQ8-0000In-1W for submit@debbugs.gnu.org; Fri, 15 Jan 2021 07:41:40 -0500 Received: from lists.gnu.org ([209.51.188.17]:47424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0OQ5-0000If-OD for submit@debbugs.gnu.org; Fri, 15 Jan 2021 07:41:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0OQ5-0001VS-Ci for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2021 07:41:37 -0500 Received: from smtp6-g21.free.fr ([2a01:e0c:1:1599::15]:57642) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0OQ3-0002l6-CI; Fri, 15 Jan 2021 07:41:37 -0500 Received: from ravel.localnet (unknown [90.116.215.75]) (Authenticated sender: ocert.dev@free.fr) by smtp6-g21.free.fr (Postfix) with ESMTPSA id A202F780372; Fri, 15 Jan 2021 13:41:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1610714493; bh=fknxt5t8dtkLOlSWwSZYMGTUmrXq3vuWP2YK4TnYwWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gfA/lpKfxASeKBVuhP4tGCc0xJHaW4s/28p/wRSOlQHvHH3gbydEubUt2xbC40hgq RseeFfCsGo+aR2w4LYqlhdpaq5Xu9l5y4Usc8kq7eIhSDO7DZDx1QhMB5WNT+XbNOX KLWknz/pUIeF4bipcQMCksKbAkj7BfchsPUfwSC/9gxw1P9QcPKFUlqftO+kORV5NA BZMUu/FSXHNOcJSXw4rEC+OFxN6pfP5Tt8+3I/+Ea+hJJdRBWt2tZaEvrsKGGIcYXn kKesXu9igkqUNYfRCHsUtdwl94K1c1YT0FOLdpdvIemCoTAaZmJZrive+Nv5ptmhm/ D2cyiQIdlYm6g== From: Olivier Certner To: Leon Vack , bug-gnu-emacs@gnu.org Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords Date: Fri, 15 Jan 2021 13:41:23 +0100 Message-ID: <1936038.bl7DLxgNLY@ravel> In-Reply-To: <87mtxalals.fsf@sol.hw.lgcl.de> References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <4311421.VgBTkc7HA1@ravel> <87mtxalals.fsf@sol.hw.lgcl.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Received-SPF: none client-ip=2a01:e0c:1:1599::15; envelope-from=ocert.dev@free.fr; helo=smtp6-g21.free.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Lars Ingebrigtsen , 45340@debbugs.gnu.org, Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Leon, > I was not aware of this, but I have done some debugging and the NickServ > authentication you use mostly likely does not go through erc-services, > but the core erc functionality to connect, which sends a PASS command > with a password from auth source. At least freenode accepts this as a way > to do NickServ authentication and the patch does not effect this > functionality at all. To check if that is indeed the case, maybe try > connecting without having the erc-services module loaded. Yes, seems to me that you are right, after activating IRC protocol debug (`erc-toggle-debug-irc-protocol'), reconnecting to Freenode and looking at the logs. > This patch introduces a different functionality as described above, as > erc-services, which only handles authentication with actual /nickserv > identify commands (not handled by the core connect functionality), did > not query auth source before this patch. Fine, I thought this may have been already implemented somehow because of Freenode's special behavior. Thanks for looking at this, and for this patch! After reviewing the code more in details, I think it is great that `erc- nickserv-get-password' first tries to find a password in `erc-nickserv- passwords' before proceeding with auth source. `erc-nickserv-passwords' is the easiest to customize, and I suspect it is mostly used for interactive override or common presets in the init file. I also have some further suggestion, beyond this enhancement. I think it would be even more useful that `erc-prompt-for-nickserv-password' is not required to be nil for auth source (or `erc-nickserv-passwords', for that purpose) to be used, but rather that, if search in `erc-nickserv-passwords' and auth source (if enabled) fails, then prompting should be used as a last resort (if enabled). I think this would cover all the use cases I can think of (with proper settings of `erc-prompt-for-nickserv-password' and `erc-use-auth- source-for-nickserv-password'). If more customizations are required, or just for the sake of 'simplicity' (YMMV), than maybe replacing these booleans with a single list indicating the means to get the password and their order could be nice. What do people think? Regards. -- Olivier Certner From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 15 16:48:53 2021 Received: (at 45340) by debbugs.gnu.org; 15 Jan 2021 21:48:53 +0000 Received: from localhost ([127.0.0.1]:41881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0Wxh-0001FC-5v for submit@debbugs.gnu.org; Fri, 15 Jan 2021 16:48:53 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:42602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0Wxd-0001Ex-Fj for 45340@debbugs.gnu.org; Fri, 15 Jan 2021 16:48:51 -0500 Received: by mail-wr1-f46.google.com with SMTP id m4so10681932wrx.9 for <45340@debbugs.gnu.org>; Fri, 15 Jan 2021 13:48:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=kaMsMAmhBqsID1htMO8BH89kKXxR3erWzCjcG94z/nI=; b=0pt44Mk8ZxtUziBnSUro05F4k5vDMRwi1EtDuGw06ocFAQnr0UIe/F/Qli8cn33ogs g030cY90ffd0BNYSiIE1fl2vs7IRNKq0VXeZZwc5+9afxAq7QFNXX68y197knVuWBkM+ E9gMePNAOCrQZhXXLxlsZ6vcx2DdXXBnsmPN7qpvKJq3cJZh5sQLwIeSVke/d/uaGfUL GWMj5j3oy4ki+OJfKUj0SovWlS8W/AsGm/937rXsyRH/I2QW6WffU5O96ky89Ifu3YTc 8Khl97tMP+/fU7zdvUK5KBYESDowZCJeZPFUpB2xJOE27Fi0EgxcqRoaPk2UgCnklO4Z 5zLg== 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:date:in-reply-to :message-id:user-agent:mime-version; bh=kaMsMAmhBqsID1htMO8BH89kKXxR3erWzCjcG94z/nI=; b=Th4T3xJJzADsxfVPp6ytt6hKOSJfnowNhH4I+9SEfPBpLx+gX0tV9/fNJvhGBydfwg PnsjGCZNC6wOIOPzTIt8Qb9nsthXjzU1xByx0rkW1dl1RqzeCD4k26TjWf6MBuiui67m 1aS3d5Ghs6Tja5zpRdCumYlLiDTHvAeY4TBkOHM5ljM7ITX36EIsCBhMm0vuAyNB+Uit z/mNtvSqw3slO9u3EzvBl29K/BXn6atkiTFB/RK2gOKs+/HbYA3QRZB4k39nGFArR9t7 B+qgs1w1bLCg6QHrgnPY2wb3tS75y+Q0RjMoOBg4wXhE2pGv8Ago7d/g1boS01L5AwIl jd4w== X-Gm-Message-State: AOAM533RMl1esSSKv1t3Z9uCl/HUO+VtdPb4xfk9bWm12WhsunVBinIo zj+LPHvjEEUCp+mzaCmNl5HWFA== X-Google-Smtp-Source: ABdhPJxjAXXBSEM635MGmuuKWUlAxVtajaqyd+yLI8NPZ2fzs0BWJdZTUKomhFuEbHyYdjFRdmh9IA== X-Received: by 2002:a05:6000:18a3:: with SMTP id b3mr15235635wri.373.1610747323576; Fri, 15 Jan 2021 13:48:43 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id q7sm15669980wrx.62.2021.01.15.13.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 13:48:42 -0800 (PST) From: "Basil L. Contovounesios" To: Richard Copley Subject: Re: bug#45340: foo References: <87v9cw7np1.fsf@sol.hw.lgcl.de> Date: Fri, 15 Jan 2021 21:48:41 +0000 In-Reply-To: (Richard Copley's message of "Wed, 13 Jan 2021 08:27:05 +0000") Message-ID: <87lfcthnwm.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45340 Cc: 45340@debbugs.gnu.org, Leon Vack X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Richard Copley writes: > https://git.savannah.gnu.org/cgit/emacs.git/diff/lisp/window.el?id=42e72f4adee8809ed754a14e11e058f40b337f78 Thanks for catching that; fixed. ; Remove recent spurious addition in window.el f45be48ddb 2021-01-15 21:46:54 +0000 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f45be48ddbde00610e1e08fca6590dcf24a4e1b5 -- Basil From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 20 05:42:19 2021 Received: (at submit) by debbugs.gnu.org; 20 Jan 2021 10:42:19 +0000 Received: from localhost ([127.0.0.1]:53023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2AwM-0004Zd-OS for submit@debbugs.gnu.org; Wed, 20 Jan 2021 05:42:19 -0500 Received: from lists.gnu.org ([209.51.188.17]:47482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2AwL-0004ZW-HG for submit@debbugs.gnu.org; Wed, 20 Jan 2021 05:42:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2AwL-0001dy-AD for bug-gnu-emacs@gnu.org; Wed, 20 Jan 2021 05:42:17 -0500 Received: from out1.migadu.com ([91.121.223.63]:46436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2AwH-0005oL-OB; Wed, 20 Jan 2021 05:42:17 -0500 References: <87v9cw7np1.fsf@sol.hw.lgcl.de> <4311421.VgBTkc7HA1@ravel> <87mtxalals.fsf@sol.hw.lgcl.de> <1936038.bl7DLxgNLY@ravel> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lgcl.de; s=key1; t=1611139326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BYuyZtNBvOck+Tmv1mtM5d5/+4JonNreLiHWCKspiM0=; b=Rt0eAHt963krrRlMoaV7pkxx/Uaov7i7DfNDxcuPRgUzO8p7bLpF1dGTFvlp61tB5ekbwT XMURmLaK6czoFNBQGwfA+of3omgrwLZMpT/VdIWMPQBpOzClOOg4x4fDTaBGf8EYMWb5wF 9B8tryf+USxak8Yyc60zsVQ6cknUvYcgmqSk615GfFb6TV+gdpm7d+ary7XL1W9zLr48dO 5VQKq1rTJwlxId4Q60ZuoNBNp2KJXwUCJTwk7qPuCPv+hyOBszg4xLwr8vIQL8vhv4x317 Yb1iKfwdmUNOapCRyr3Jmnv5o2aVDyVLWwZ/f1Lk/viUglpwlVY1Wrm3HybZqg== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Leon Vack To: Olivier Certner Subject: Re: bug#45340: erc-services.el: Auth-source support for passwords In-reply-to: <1936038.bl7DLxgNLY@ravel> Date: Wed, 20 Jan 2021 11:42:05 +0100 Message-ID: <87o8hj28le.fsf@sol.hw.lgcl.de> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: dev@lgcl.de Received-SPF: pass client-ip=91.121.223.63; envelope-from=dev@lgcl.de; helo=out1.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org, 45340@debbugs.gnu.org, Amin Bandali , Lars Ingebrigtsen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hello Olivier, sorry for the long time it took me to reply. Olivier Certner writes: > I also have some further suggestion, beyond this enhancement. I think it would > be even more useful that `erc-prompt-for-nickserv-password' is not required to > be nil for auth source (or `erc-nickserv-passwords', for that purpose) to be > used, but rather that, if search in `erc-nickserv-passwords' and auth source > (if enabled) fails, then prompting should be used as a last resort (if > enabled). I think this would cover all the use cases I can think of (with > proper settings of `erc-prompt-for-nickserv-password' and `erc-use-auth- > source-for-nickserv-password'). If more customizations are required, or just > for the sake of 'simplicity' (YMMV), than maybe replacing these booleans with > a single list indicating the means to get the password and their order could > be nice. > > What do people think? > I personally agree with you on this. Having to change `erc-prompt-for-nickserv-password' for `erc-nickserv-passwords' to have an effect caught me off guard in the beginning as well. The list of NickServ password sources seems like the more flexible solution, but would be a bit more complex to implement, considering how the current system works. Changing the precedence to `erc-nickserv-passwords', auth source and then prompt (if enabled), on the other hand, should be a rather simple patch. I think we should discuss this not on this bug, but on the emacs-erc mailing list before we change that. Regards, Leon Vack From unknown Sat Sep 13 08:57:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 17 Feb 2021 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator