]> git.eshelyaron.com Git - emacs.git/commitdiff
url-http.el: Special-case NTLM authentication
authorThomas Fitzsimmons <fitzsim@fitzsim.org>
Sun, 31 Jan 2021 23:36:52 +0000 (18:36 -0500)
committerThomas Fitzsimmons <fitzsim@fitzsim.org>
Mon, 1 Feb 2021 00:11:16 +0000 (19:11 -0500)
* lisp/url/url-http.el (url-http-handle-authentication): Do not
signal an error on NTLM authorization strings.  (Bug#43566)

lisp/url/url-http.el

index b4d7d333f342ed298f87a1710c488b144d95b068..473da6f84c9e2c23ca38ff07b7d8c2164c9528f2 100644 (file)
@@ -461,8 +461,10 @@ Return the number of characters removed."
     ;; headers, then this means that we've already tried sending
     ;; credentials to the server, and they were wrong, so just give
     ;; up.
-    (when (assoc "Authorization" url-http-extra-headers)
-      (error "Wrong authorization used for %s" url))
+    (let ((authorization (assoc "Authorization" url-http-extra-headers)))
+      (when (and authorization
+                (not (string-match "^NTLM " (cdr authorization))))
+       (error "Wrong authorization used for %s" url)))
 
     ;; find strongest supported auth
     (dolist (this-auth auths)