unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thomas Fitzsimmons <fitzsim@fitzsim.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: "William Xu" <william.xwl@gmail.com>,
	43566@debbugs.gnu.org, "Jeffrey Haug" <jthaug@gmail.com>,
	"Domingo Gómez Pérez" <domingo.gomez@unican.es>
Subject: bug#43566: 27.1; url-http and excorporate does not authenticate
Date: Sun, 31 Jan 2021 10:03:19 -0500	[thread overview]
Message-ID: <m35z3drvwo.fsf@fitzsim.org> (raw)
In-Reply-To: <878sabdqky.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 06 Dec 2020 14:14:21 +0100")

Hi Lars,

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:
>
>> I no longer use the NTLM mode myself, but I did manage to independently
>> figure out the issue by implementing an NTLM server in elisp.  I'm going
>> to add it to the test suite, since otherwise it's not feasible for Emacs
>> maintainers to test ntlm.el properly (which is what happened in Emacs
>> 27.1).  I can test inflooping against it too once I have the changes
>> ready.
>
> Great!

I've got an initial version of the test running locally.  There's still
a lot of integration to do, which I probably won't finish before Emacs
27.2.  I'd like to put in a workaround for now.

How about this patch for the emacs-27 branch?  Is there a test suite
entry for bug 27022 that I can run against my elisp NTLM server?

Thanks,
Thomas

diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 298f204791..89d2189ad1 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -461,8 +461,10 @@ url-http-handle-authentication
     ;; 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	other threads:[~2021-01-31 15:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22 11:20 bug#43566: 27.1; url-http and excorporate does not authenticate Domingo Gómez Pérez
2020-09-24 15:22 ` Lars Ingebrigtsen
2020-09-25 11:38   ` Domingo Gómez Pérez
2020-09-25 11:41     ` Lars Ingebrigtsen
2020-12-04 23:29       ` Thomas Fitzsimmons
2020-12-05 12:40         ` William Xu
2020-12-06 13:14         ` Lars Ingebrigtsen
2021-01-31 15:03           ` Thomas Fitzsimmons [this message]
2021-01-31 15:13             ` Eli Zaretskii
2021-02-01  8:43             ` Lars Ingebrigtsen
2021-02-01 13:28               ` Thomas Fitzsimmons
2021-02-19  1:58                 ` Thomas Fitzsimmons
2021-02-19 12:31                   ` Lars Ingebrigtsen
2021-02-19 14:18                     ` Thomas Fitzsimmons
2021-02-19 15:00                       ` Lars Ingebrigtsen
2021-02-19 16:35                         ` Thomas Fitzsimmons
2021-02-19 22:26                           ` Thomas Fitzsimmons
2020-09-29 22:19   ` Thomas Fitzsimmons
2020-09-29 22:42 ` Thomas Fitzsimmons
2020-09-30 17:00   ` Domingo Gómez Pérez
     [not found] <a84cfa50-5e21-4d75-a0bd-c6dc4d8763bc@email.android.com>
2020-09-26 13:15 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m35z3drvwo.fsf@fitzsim.org \
    --to=fitzsim@fitzsim.org \
    --cc=43566@debbugs.gnu.org \
    --cc=domingo.gomez@unican.es \
    --cc=jthaug@gmail.com \
    --cc=larsi@gnus.org \
    --cc=william.xwl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).