emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 dc78f8a: url-http.el: Special-case NTLM authentication


From: Thomas Fitzsimmons
Subject: emacs-27 dc78f8a: url-http.el: Special-case NTLM authentication
Date: Mon, 1 Feb 2021 08:25:40 -0500 (EST)

branch: emacs-27
commit dc78f8a4ead88744c258ae712adb4fbbb65ec539
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>

    url-http.el: Special-case NTLM authentication
    
    * 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 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index b4d7d33..473da6f 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]