aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-07-26 10:55:39 +0200
committerLars Ingebrigtsen2019-07-26 10:55:45 +0200
commit64b469f6ae8173116ec948ac43cd44efe4b5a221 (patch)
treea2da0a12881eb88fd3df868837bc5f5a97045374
parentf462fcd1ff60d0abf780bafe11a8f228b4fffab2 (diff)
downloademacs-64b469f6ae8173116ec948ac43cd44efe4b5a221.tar.gz
emacs-64b469f6ae8173116ec948ac43cd44efe4b5a221.zip
Don't infloop in url.el when sending invalid basic auth
* lisp/url/url-http.el (url-http-handle-authentication): Bail out if the wrong credentials were passed to the server instead of inflooping (bug#27022).
-rw-r--r--lisp/url/url-http.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 527760118d4..f7f2f3d179d 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -453,6 +453,14 @@ Return the number of characters removed."
453 auth 453 auth
454 (strength 0)) 454 (strength 0))
455 455
456 ;; If we're here, then we got a 40x Unauthorized response from the
457 ;; server. If we already have "Authorization" in the extra
458 ;; headers, then this means that we've already tried sending
459 ;; credentials to the server, and they were wrong, so just give
460 ;; up.
461 (when (assoc "Authorization" url-http-extra-headers)
462 (error "Wrong authorization used for %s" url))
463
456 ;; find strongest supported auth 464 ;; find strongest supported auth
457 (dolist (this-auth auths) 465 (dolist (this-auth auths)
458 (setq this-auth (url-eat-trailing-space 466 (setq this-auth (url-eat-trailing-space