[gnus git] branch master updated: m0-11-110-gb11d183 =1= * nntp.el (nntp-send-authinfo): Error out if the password is wrong.

Lars <[email protected]> Thu, 15 Jan 2015 22:49:19 +0100
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  b11d1833ee1e5dc302317b8604e6d8e35e425994 (commit)
      from  18a04f2e346efc244a4d9042532a8a0c50338d55 (commit)


- Log -----------------------------------------------------------------
commit b11d1833ee1e5dc302317b8604e6d8e35e425994
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Thu Jan 15 22:49:15 2015 +0100

    * nntp.el (nntp-send-authinfo): Error out if the password is wrong.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0c9d9ce..233f2de 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2015-01-15  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* nntp.el (nntp-send-authinfo): Error out if the password is wrong.
+
 2015-01-08  Stefan Monnier  <[email protected]>
 
 	* registry.el: Don't use <class> as a variable.
diff --git a/lisp/nntp.el b/lisp/nntp.el
index e071368..0891dba 100644
--- a/lisp/nntp.el
+++ b/lisp/nntp.el
@@ -1219,14 +1219,17 @@ If SEND-IF-FORCE, only send authinfo to the server if the
 	      nntp-authinfo-user user))
       (unless (member user '(nil ""))
 	(nntp-send-command "^3.*\r?\n" "AUTHINFO USER" user)
-	(when t				;???Should check if AUTHINFO succeeded
+	(let ((result
 	       (nntp-send-command
 		"^2.*\r?\n" "AUTHINFO PASS"
 		(or passwd
 		    nntp-authinfo-password
 		    (setq nntp-authinfo-password
 			  (read-passwd (format "NNTP (%s@%s) password: "
-					  user nntp-address))))))))))
+					       user nntp-address)))))))
+	  (if (not result)
+	      (signal 'nntp-authinfo-rejected "Password rejected")
+	    result))))))
 
 ;;; Internal functions.
 

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog |    4 ++++
 lisp/nntp.el   |   19 +++++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project