GNU bug report logs - #46777
28.0.50; ERC: NickServ identification: Prompt for password after other sources, overall simplifications

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

Package: emacs; Reported by: Olivier Certner <ocert.dev@HIDDEN>; Keywords: patch; dated Thu, 25 Feb 2021 17:35:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 46777) by debbugs.gnu.org; 25 Feb 2021 18:22:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 25 13:22:16 2021
Received: from localhost ([127.0.0.1]:39227 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lFLHE-00073M-72
	for submit <at> debbugs.gnu.org; Thu, 25 Feb 2021 13:22:16 -0500
Received: from smtp6-g21.free.fr ([212.27.42.6]:14964)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ocert.dev@HIDDEN>) id 1lFLH7-000738-Hd
 for 46777 <at> debbugs.gnu.org; Thu, 25 Feb 2021 13:22:15 -0500
Received: from ravel.localnet (unknown [90.118.181.206])
 (Authenticated sender: ocert.dev@HIDDEN)
 by smtp6-g21.free.fr (Postfix) with ESMTPSA id BACFF7802B2;
 Thu, 25 Feb 2021 19:22:04 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr;
 s=smtp-20201208; t=1614277328;
 bh=zEvhJ6aoTbtVSx2wuQVumZMkSvkBxlkblZwABxRTuDg=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=bF/zBqQVPxdDLMJpQ6WKQ2U3NXveqj2hoFk42xjK0l+3KJ6u02pKhqfHJuePA4JmX
 c31RimO3kPpng3xnxix4hziKp5lGixidi/4LJ9WPjAStOlUtoEOWaHS3I0ufhDrJxP
 +HTHSEkwzo0Imf1tMEwusi8I/6WBj0RGvl5myARo71b5HP8LbvFuy+Kp/zvg1oEN0F
 zL0fuiVw/rLoMKiBl8FTzQGrbewKMAM2SVFPqz469F06Uw/DOPK1iuTSyL7i4d1hKs
 zTJQwY9NJ7/UVGUi1krWE2NyjQkyfvjMzILF73zLeYpZgLICRo1UEAPmGLdz7G6jT+
 ekf0Ztgy84QGw==
From: Olivier Certner <ocert.dev@HIDDEN>
To: "Basil L. Contovounesios" <contovob@HIDDEN>
Subject: Re: bug#46777: 28.0.50;
 ERC: NickServ identification: Prompt for password after other
 sources, overall simplifications
Date: Thu, 25 Feb 2021 19:22:04 +0100
Message-ID: <2033905.uJW0cDvVUg@ravel>
In-Reply-To: <87im6ghwek.fsf@HIDDEN>
References: <5495728.XOh7uYVVfo@ravel> <2068265.RhTPgMbj8J@ravel>
 <87im6ghwek.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="nextPart1896953.EnoYUHA41c"
Content-Transfer-Encoding: 7Bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 46777
Cc: 46777 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.

--nextPart1896953.EnoYUHA41c
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="UTF-8"

Sure. Attached.

-- 
Olivier Certner
--nextPart1896953.EnoYUHA41c
Content-Disposition: attachment; filename="0001-NickServ-identification-Prompt-for-password-last-ove.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="UTF-8"; name="0001-NickServ-identification-Prompt-for-password-last-ove.patch"

From 0b3d0c7a53f4a9d14db8301a8e499bf62cab619a Mon Sep 17 00:00:00 2001
From: Olivier Certner <olce.emacs@HIDDEN>
Date: Fri, 5 Feb 2021 15:34:50 +0100
Subject: [PATCH] NickServ identification: Prompt for password last, overall
 simplifications

When `erc-prompt-for-nickserv-password' is true, don't ignore the
other forms of identification.  Instead, process them first, and
prompt for the password last.  Separate concerns (determination of the
nick to use, of the password to use, and actual message sending).

Note that the user can be interactively prompted for a password on
reception of a Nickserv request, as before (on
`erc-prompt-for-nickserv-password').

* lisp/erc/erc-services.el (erc-nickserv-identify): Don't take the
password anymore as an argument (and don't prompt for it
interactively).  On the contrary, now take the nick to use for
identification (interactively, ask for it, defaulting to the current
one).  Move actual message sending into the new
`erc-nickserv-send-identify', and password prompting into
`erc-nickserv-get-password'.

(erc-nickserv-send-identify): New function containing the sending
code, given the nick and password.

(erc-nickserv-get-password): Try each password source in turn, in this
order: `erc-nickserv-passwords', auth-source (if
`erc-use-auth-source-for-nickserv-password' is true), and in the end
prompt the user interactively (if `erc-prompt-for-nickserv-password'
is true).  If one source returns a string, the function returns it, or
nil if the string is empty.

(erc-nickserv-call-identify-function): Remove.  It was necessary as a
cumbersome workaround for the fact that the code for password
prompting was in the `interactive' form of function
`erc-nickserv-identify' before this change.

(erc-nickserv-identify-autodetect, erc-nickserv-identify-on-connect)
(erc-nickserv-identify-on-nick-change): Call `erc-nickserv-identify'
directly (`erc-nickserv-call-identify-function' was removed).  For the
last two functions, remove the redundant checks on the Nickserv
identification flags (additionally, it is doubtful they have any
measurable impact on performance).
---
 etc/NEWS                 |  14 +++-
 lisp/erc/erc-services.el | 157 ++++++++++++++++++++++-----------------
 2 files changed, 99 insertions(+), 72 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index caa366aaef..3fbf7c6b29 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1528,14 +1528,20 @@ https://www.w3.org/TR/xml/#charsets).  Now it rejects such strings.
 
 ** erc
 
----
-*** erc-services.el now supports NickServ passwords from auth-source.
+*** NickServ passwords can now be retrieved from auth-source
 The 'erc-use-auth-source-for-nickserv-password' user option 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)
+    (setq erc-use-auth-source-for-nickserv-password t)
+
+*** NickServ identification now prompts for password last
+When 'erc-prompt-for-nickserv-password' is true, the user used to be
+unconditionally prompted interactively for a password, regardless of
+the content of `erc-nickserv-passwords', which was effectively ignored
+(same for the new 'erc-use-auth-source-for-nickserv-password').  This
+limitation is now removed, and the user is interactively prompted
+last, after the other identification methods have run.
 
 ---
 *** The '/ignore' command will now ask for a timeout to stop ignoring the user.
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el
index 9ef8b7f46a..3740e54672 100644
--- a/lisp/erc/erc-services.el
+++ b/lisp/erc/erc-services.el
@@ -170,9 +170,8 @@ You can also use \\[erc-nickserv-identify-mode] to change modes."
 
 (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 non-nil, and passwords from `erc-nickserv-passwords' take
-precedence."
+Passwords from `erc-nickserv-passwords' take precedence.  See
+function `erc-nickserv-get-password'."
   :version "28.1"
   :group 'erc-services
   :type 'boolean)
@@ -400,85 +399,107 @@ password for this nickname, otherwise try to send it automatically."
 		 identify-regex
 		 (string-match identify-regex msg))
 	(erc-log "NickServ IDENTIFY request detected")
-	(erc-nickserv-call-identify-function nick)
+	(erc-nickserv-identify nick)
 	nil))))
 
 (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-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)))
+  (unless (and (eq erc-nickserv-identify-mode 'both)
+               (erc-nickserv-alist-regexp (erc-network)))
+    (erc-nickserv-identify 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)
-                   (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)))
+  (unless (and (eq erc-nickserv-identify-mode 'both)
+               (erc-nickserv-alist-regexp (erc-network)))
+    (erc-nickserv-identify nick)))
 
-(defun erc-nickserv-get-password (nickname)
-  "Return the password for NICKNAME from configured sources.
+(defun erc-nickserv-get-password (nick)
+  "Return the password for NICK from configured sources.
+First, a password for NICK is looked up in
+`erc-nickserv-passwords'.  Then, it is looked up in auth-source
+if `erc-use-auth-source-for-nickserv-password' is not nil.
+Finally, interactively prompt the user, if
+`erc-prompt-for-nickserv-password' is true.
 
-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)
-    (erc-nickserv-identify (erc-nickserv-get-password nickname))))
+As soon as some source returns a password, the sequence of
+lookups stops and this function returns it (or returns nil if it
+is empty).  Otherwise, no corresponding password was found, and
+it returns nil."
+  (let (network server port)
+    ;; Fill in local vars, switching to the server buffer once only
+    (erc-with-server-buffer
+     (setq network erc-network
+           server erc-session-server
+           port erc-session-port))
+    (let ((ret
+           (or
+            (when erc-nickserv-passwords
+              (cdr (assoc nick
+                          (cl-second (assoc network
+                                            erc-nickserv-passwords)))))
+            (when erc-use-auth-source-for-nickserv-password
+              (let ((secret (cl-first (auth-source-search
+                                       :max 1 :require '(:secret)
+                                       :host server
+                                       ;; Ensure a string for :port
+                                       :port (format "%s" port)
+                                       :user nick))))
+                (when secret
+                  (let ((passwd (plist-get secret :secret)))
+                    (if (functionp passwd) (funcall passwd) passwd)))))
+            (when erc-prompt-for-nickserv-password
+              (read-passwd
+               (format "NickServ password for %s on %s (RET to cancel): "
+                       nick network))))))
+      (when (and ret (not (string= ret "")))
+        ret))))
 
 (defvar erc-auto-discard-away)
 
-;;;###autoload
-(defun erc-nickserv-identify (password)
+(defun erc-nickserv-send-identify (nick password)
   "Send an \"identify <PASSWORD>\" message to NickServ.
-When called interactively, read the password using `read-passwd'."
+Returns t if the message could be sent, nil otherwise."
+  (let* ((erc-auto-discard-away nil)
+         (network (erc-network))
+         (nickserv-info (assoc network erc-nickserv-alist))
+         (nickserv (or (erc-nickserv-alist-nickserv nil nickserv-info)
+                       "NickServ"))
+         (identify-word (or (erc-nickserv-alist-ident-keyword
+                             nil nickserv-info)
+                            "IDENTIFY"))
+         (nick (if (erc-nickserv-alist-use-nick-p nil nickserv-info)
+                   (concat nick " ")
+                 ""))
+         (msgtype (or (erc-nickserv-alist-ident-command nil nickserv-info)
+                      "PRIVMSG")))
+    (erc-message msgtype
+                 (concat nickserv " " identify-word " " nick password))))
+
+;;;###autoload
+(defun erc-nickserv-identify (&optional nick)
+  "Identify to NickServ immediately.
+Identification will either use NICK or the current nick if not
+provided, and some password obtained through
+`erc-nickserv-get-password' (which see).  If no password can be
+found, an error is reported trough `erc-error'.
+
+Interactively, the user will be prompted for NICK, an empty
+string meaning to default to the current nick.
+
+Returns t if the identify message could be sent, nil otherwise."
   (interactive
-   (list (read-passwd
-	  (format "NickServ password for %s on %s (RET to cancel): "
-		  (erc-current-nick)
-		  (or (and (erc-network)
-			   (symbol-name (erc-network)))
-		      "Unknown network")))))
-  (when (and password (not (string= "" password)))
-    (let* ((erc-auto-discard-away nil)
-	   (network (erc-network))
-	   (nickserv-info (assoc network erc-nickserv-alist))
-	   (nickserv (or (erc-nickserv-alist-nickserv nil nickserv-info)
-			 "NickServ"))
-	   (identify-word (or (erc-nickserv-alist-ident-keyword
-			       nil nickserv-info)
-			      "IDENTIFY"))
-	   (nick (if (erc-nickserv-alist-use-nick-p nil nickserv-info)
-		     (concat (erc-current-nick) " ")
-		   ""))
-	   (msgtype (or (erc-nickserv-alist-ident-command nil nickserv-info)
-			"PRIVMSG")))
-      (erc-message msgtype
-		   (concat nickserv " " identify-word " " nick password)))))
+   (list
+    (read-from-minibuffer "Nickname: " nil nil nil
+                          'erc-nick-history-list (erc-current-nick))))
+  (unless (and nick (not (string= nick "")))
+    (setq nick (erc-current-nick)))
+  (let ((password (erc-nickserv-get-password nick)))
+    (if password
+        (erc-nickserv-send-identify nick password)
+      (erc-error "Cannot find a password for nickname %s"
+                 nick)
+      nil)))
 
 (provide 'erc-services)
 
-- 
2.30.0


--nextPart1896953.EnoYUHA41c--







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

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


Received: (at 46777) by debbugs.gnu.org; 25 Feb 2021 17:47:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 25 12:47:40 2021
Received: from localhost ([127.0.0.1]:39178 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lFKjk-0006EE-LZ
	for submit <at> debbugs.gnu.org; Thu, 25 Feb 2021 12:47:40 -0500
Received: from mail-wm1-f51.google.com ([209.85.128.51]:35183)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1lFKji-0006E1-Oy
 for 46777 <at> debbugs.gnu.org; Thu, 25 Feb 2021 12:47:39 -0500
Received: by mail-wm1-f51.google.com with SMTP id o16so5611986wmh.0
 for <46777 <at> debbugs.gnu.org>; Thu, 25 Feb 2021 09:47:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=L9c4XAhF7I3O/NzSFREFsrrZ6A0WA4wX6geUcN+Dibc=;
 b=dbk/4E1hFwoIRNTJeUbJVJSIHxZP+s9SGk18AXIIoVZFfjEXcJdsNE977Z2suJMVV3
 Y2o6WbMHTeprCLm/dD35eJPMPu7lgiCCKnHpL0zl6LMiDgzzcViNgTSiaFDTWER3Zf6P
 +a1RHcHIJTCs3IVCOF6fC/buYigygkFW+GL5Jy9U2jVZo9f5T1SBQJldqnTGckk8VsDE
 gc6OxqD2NNOLOfEDI54hEgy3IrYM4Qww8T3hlI0ENK9Z5TbOX7VIX9T+78R3Lb4fG9Lq
 WzJXghztIAY9fmT7/UoVs0riA+RQrv6XeU/AAL0RfgDm5Q7cG4mf9o9ezM2dpUvca8DT
 pgew==
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=L9c4XAhF7I3O/NzSFREFsrrZ6A0WA4wX6geUcN+Dibc=;
 b=dsGXpEX9217Nz4vGWSkOEFP27cj/ntTGjeBVQpeQKEP5zQE7HuVbpXwhrJO49KVlN4
 def/iq4Rkoog4nWzOGpbBu69ZEVk3fjJW6d//8QWn3ome0UacJ+f+8olgGO8nX1o6Psi
 xFfJEQRRiA9BqbKXzbxCmR2P+lCtGuUfx6Dwt99FK7JjI2g4R6XbzJ32bo7PwMQBuJxP
 kbsaSnu7sjsk/gyoSxic9g+VXhYSegtaJwUvAZyzIf0R93mrlxOPZy0geF0TwM02bgFh
 xU2eKnNR7nOBilbMNJXKg3/NLebqfp+7HWEdGK0BSI8QxqIsqPIJqd19sqqXS3EPkjrM
 fguQ==
X-Gm-Message-State: AOAM5309T6J3T4DBw2wNd50Ihili8w7MmA/a/kc2i4LNdSeyAX530AhK
 sDo7wt5Pc0WZzzVyeJoU2OIR+w==
X-Google-Smtp-Source: ABdhPJwZZBDxyewiz6QEncQ658ddLloLhmHKM44ZjRv+Eq5w09imqctF4x6z2RTuS94xnbm7jAAQpA==
X-Received: by 2002:a1c:5419:: with SMTP id i25mr4400438wmb.166.1614275252920; 
 Thu, 25 Feb 2021 09:47:32 -0800 (PST)
Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1])
 by smtp.gmail.com with ESMTPSA id a14sm11072708wrg.84.2021.02.25.09.47.32
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 25 Feb 2021 09:47:32 -0800 (PST)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
To: Olivier Certner <ocert.dev@HIDDEN>
Subject: Re: bug#46777: 28.0.50; ERC: NickServ identification: Prompt for
 password after other sources, overall simplifications
References: <5495728.XOh7uYVVfo@ravel> <2068265.RhTPgMbj8J@ravel>
Date: Thu, 25 Feb 2021 17:47:31 +0000
In-Reply-To: <2068265.RhTPgMbj8J@ravel> (Olivier Certner's message of "Thu, 25
 Feb 2021 18:38:45 +0100")
Message-ID: <87im6ghwek.fsf@HIDDEN>
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: 46777
Cc: 46777 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Olivier Certner <ocert.dev@HIDDEN> writes:

> Corresponding "pull request" (just for showing the diff):
> https://github.com/OlCe2/emacs/pull/2

Thanks, but I think it's generally easier/preferred to review patches
here if you send them as attachments.  See the file CONTRIBUTE.

-- 
Basil




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

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


Received: (at 46777) by debbugs.gnu.org; 25 Feb 2021 17:38:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 25 12:38:49 2021
Received: from localhost ([127.0.0.1]:39169 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lFKbB-00061M-Fx
	for submit <at> debbugs.gnu.org; Thu, 25 Feb 2021 12:38:49 -0500
Received: from smtp6-g21.free.fr ([212.27.42.6]:59770)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ocert.dev@HIDDEN>) id 1lFKbA-00061E-0a
 for 46777 <at> debbugs.gnu.org; Thu, 25 Feb 2021 12:38:48 -0500
Received: from ravel.localnet (unknown [90.118.181.206])
 (Authenticated sender: ocert.dev@HIDDEN)
 by smtp6-g21.free.fr (Postfix) with ESMTPSA id CCBD5780344
 for <46777 <at> debbugs.gnu.org>; Thu, 25 Feb 2021 18:38:45 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr;
 s=smtp-20201208; t=1614274726;
 bh=7qYjXbe7GVsXEF0Y7ECombN2rw9SnX4E3eyO2D6xVTw=;
 h=From:To:Subject:Date:From;
 b=BgbwGhXHz6LqWI/C59RJ/UVen5TX3v3B7tUTYtqOP4USD0zpKdv5Mb5ls02J5Ke1i
 6XJY46TjFRS5P+bVuwsQnIV7/lC3RcRw+nI5whQnxlvJY1xMZKfIERV6/t68RVPEe4
 h90YJUxWFgD7IdzgzZDXnkNNmkKBaVjHWVBSPkYsHn33qTib65iWg7hUOBmS5l3MPm
 VBvy0DuWowjdnlA+sZeS48Ds73vQCMymQ5TYK344zysFAagjuvBzD5VSO6sHSzeyqC
 q3TpiIDMDOOVBWBv8GZNi/kr0jQ45WksCuQ+XqK31uABZqQKHu+y18Sb18ZW407tjz
 7KkSAb1w6ITnA==
From: Olivier Certner <ocert.dev@HIDDEN>
To: 46777 <at> debbugs.gnu.org
Subject: 28.0.50; ERC: NickServ identification: Prompt for password after other
 sources, overall simplifications
Date: Thu, 25 Feb 2021 18:38:45 +0100
Message-ID: <2068265.RhTPgMbj8J@ravel>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 46777
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Corresponding "pull request" (just for showing the diff):
https://github.com/OlCe2/emacs/pull/2

-- 
Olivier Certner






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

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


Received: (at submit) by debbugs.gnu.org; 25 Feb 2021 17:34:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 25 12:34:02 2021
Received: from localhost ([127.0.0.1]:39157 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lFKWY-0005uE-Es
	for submit <at> debbugs.gnu.org; Thu, 25 Feb 2021 12:34:02 -0500
Received: from lists.gnu.org ([209.51.188.17]:50638)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ocert.dev@HIDDEN>) id 1lFKWV-0005to-Bd
 for submit <at> debbugs.gnu.org; Thu, 25 Feb 2021 12:34:01 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:52252)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ocert.dev@HIDDEN>) id 1lFKWV-0000Be-1Y
 for bug-gnu-emacs@HIDDEN; Thu, 25 Feb 2021 12:33:59 -0500
Received: from smtp6-g21.free.fr ([2a01:e0c:1:1599::15]:50674)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ocert.dev@HIDDEN>) id 1lFKWT-0004MM-5d
 for bug-gnu-emacs@HIDDEN; Thu, 25 Feb 2021 12:33:58 -0500
Received: from ravel.localnet (unknown [90.118.181.206])
 (Authenticated sender: ocert.dev@HIDDEN)
 by smtp6-g21.free.fr (Postfix) with ESMTPSA id 930EB78032A
 for <bug-gnu-emacs@HIDDEN>; Thu, 25 Feb 2021 18:33:53 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr;
 s=smtp-20201208; t=1614274434;
 bh=mM5YnwtlAsp8uz8Pz3JS+HBfIDIYGdVIaPZcgGQtkXE=;
 h=From:To:Subject:Date:From;
 b=IgJYN+kyam/UWP3VVidAX11dA1MQRSI49d8AmTap6DoHiH74vq/j/OY3OdtVWbauk
 9HNQLXrv1dnP9JYbPInm1om7h7vQJE1SgZY7aXtsSkL2DVm+30P/vWGE9XASTpTBQ4
 UZuUF2A0roEXAXm0FZi/ff6sKb+xI12fRf9ws/51VtJ2OFya3K7rwOw8WBY+0WzpKR
 Y4Xga946uJEKPeucKCF8t4UBRQz4hlZvsmE4deZUibXIAFaueLPrAPFNBrCoKeOFxn
 6R7vND5zx/oC2qtByCpeW8fA+UoySosf8QjDc8Ld+Cj0F8YPQULpVECx2WZz4FZk0c
 Dw2x8VQ3rDRiw==
From: Olivier Certner <ocert.dev@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; ERC: NickServ identification: Prompt for password after other
 sources, overall simplifications
Date: Thu, 25 Feb 2021 18:33:53 +0100
Message-ID: <5495728.XOh7uYVVfo@ravel>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2a01:e0c:1:1599::15;
 envelope-from=ocert.dev@HIDDEN; 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_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

When `erc-prompt-for-nickserv-password' is true, don't ignore the
other forms of identification.  Instead, process them first, and
prompt for the password last.  Separate concerns (determination of the
nick to use, of the password to use, and actual message sending).

Note that the user can be interactively prompted for a password on
reception of a Nickserv request, as before (on
`erc-prompt-for-nickserv-password').

This is a follow-up to #45340 (see end of discussion there for additional 
context).

Pull request with the single commit to be posted after the bug is open. 
Changes rebased on master.

-- 
Olivier Certner






Acknowledgement sent to Olivier Certner <ocert.dev@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#46777; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 26 Feb 2021 09:30:02 UTC

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