diff options
| author | Lars Magne Ingebrigtsen | 2015-01-15 22:19:28 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2015-01-15 22:19:28 +0000 |
| commit | d0b8d4bb328d33d245a10d546bec5ef3e3c05c9d (patch) | |
| tree | 656160b00d253e33618a15df82854b4b83a864b0 | |
| parent | 0f238ea450b3a976f04c95c4cf8befaadad1cdd0 (diff) | |
| download | emacs-d0b8d4bb328d33d245a10d546bec5ef3e3c05c9d.tar.gz emacs-d0b8d4bb328d33d245a10d546bec5ef3e3c05c9d.zip | |
lisp/gnus/nntp.el (nntp-send-authinfo): Error out if the password is wrong
| -rw-r--r-- | lisp/gnus/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/gnus/nntp.el | 19 |
2 files changed, 15 insertions, 8 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 20de9aea136..5a61a211661 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2015-01-15 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * nntp.el (nntp-send-authinfo): Error out if the password is wrong. | ||
| 4 | |||
| 1 | 2015-01-08 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2015-01-08 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * registry.el: Don't use <class> as a variable. | 7 | * registry.el: Don't use <class> as a variable. |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index e071368401b..0891dba0387 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -1219,14 +1219,17 @@ If SEND-IF-FORCE, only send authinfo to the server if the | |||
| 1219 | nntp-authinfo-user user)) | 1219 | nntp-authinfo-user user)) |
| 1220 | (unless (member user '(nil "")) | 1220 | (unless (member user '(nil "")) |
| 1221 | (nntp-send-command "^3.*\r?\n" "AUTHINFO USER" user) | 1221 | (nntp-send-command "^3.*\r?\n" "AUTHINFO USER" user) |
| 1222 | (when t ;???Should check if AUTHINFO succeeded | 1222 | (let ((result |
| 1223 | (nntp-send-command | 1223 | (nntp-send-command |
| 1224 | "^2.*\r?\n" "AUTHINFO PASS" | 1224 | "^2.*\r?\n" "AUTHINFO PASS" |
| 1225 | (or passwd | 1225 | (or passwd |
| 1226 | nntp-authinfo-password | 1226 | nntp-authinfo-password |
| 1227 | (setq nntp-authinfo-password | 1227 | (setq nntp-authinfo-password |
| 1228 | (read-passwd (format "NNTP (%s@%s) password: " | 1228 | (read-passwd (format "NNTP (%s@%s) password: " |
| 1229 | user nntp-address)))))))))) | 1229 | user nntp-address))))))) |
| 1230 | (if (not result) | ||
| 1231 | (signal 'nntp-authinfo-rejected "Password rejected") | ||
| 1232 | result)))))) | ||
| 1230 | 1233 | ||
| 1231 | ;;; Internal functions. | 1234 | ;;; Internal functions. |
| 1232 | 1235 | ||