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

This commit is contained in:
Lars Magne Ingebrigtsen 2015-01-15 22:19:28 +00:00 committed by Katsumi Yamaoka
parent 0f238ea450
commit d0b8d4bb32
2 changed files with 15 additions and 8 deletions

View file

@ -1,3 +1,7 @@
2015-01-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
* nntp.el (nntp-send-authinfo): Error out if the password is wrong.
2015-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
* registry.el: Don't use <class> as a variable.

View file

@ -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
(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))))))))))
(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)))))))
(if (not result)
(signal 'nntp-authinfo-rejected "Password rejected")
result))))))
;;; Internal functions.