From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.bugs Subject: bug#43566: 27.1; url-http and excorporate does not authenticate Date: Sun, 31 Jan 2021 10:03:19 -0500 Message-ID: References: <87tuvqxdl8.fsf@menzobaran.matesco.unican.es> <874knnw66a.fsf@gnus.org> <877dsi9jd1.fsf@menzobaran.matesco.unican.es> <87v9g2ozh1.fsf@gnus.org> <878sabdqky.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34331"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (gnu/linux) Cc: William Xu , 43566@debbugs.gnu.org, Jeffrey Haug , Domingo =?UTF-8?Q?G=C3=B3mez_?= =?UTF-8?Q?P=C3=A9rez?= To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 31 16:04:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6EGo-0008oa-SD for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Jan 2021 16:04:10 +0100 Original-Received: from localhost ([::1]:51248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6EGn-0007Kt-Uy for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Jan 2021 10:04:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6EGg-0007Kj-Ak for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 10:04:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6EGg-00029d-3S for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 10:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l6EGf-0003eh-VN for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 10:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Jan 2021 15:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43566 X-GNU-PR-Package: emacs Original-Received: via spool by 43566-submit@debbugs.gnu.org id=B43566.161210541214008 (code B ref 43566); Sun, 31 Jan 2021 15:04:01 +0000 Original-Received: (at 43566) by debbugs.gnu.org; 31 Jan 2021 15:03:32 +0000 Original-Received: from localhost ([127.0.0.1]:57667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6EGB-0003dr-Fr for submit@debbugs.gnu.org; Sun, 31 Jan 2021 10:03:32 -0500 Original-Received: from mail-qt1-f181.google.com ([209.85.160.181]:46997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6EG7-0003dY-2u for 43566@debbugs.gnu.org; Sun, 31 Jan 2021 10:03:29 -0500 Original-Received: by mail-qt1-f181.google.com with SMTP id l23so10358561qtq.13 for <43566@debbugs.gnu.org>; Sun, 31 Jan 2021 07:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=C64q16PxaeutROTVXo1CCYw9UB56aDXX5askU1G2sJY=; b=exCflnUFrxCZ1YEube697mR3iQ1GdenJxUAwGnjUS5E/NjzoDX/xXOtkeDsiJP9mR1 KGT95Y/LTny7tOPAY3E+dlSzyPeFJ2SMWqUW6nbzSSI5RlE5R0tLSqa0dlJI2AIuvPx3 Ie2wKl5xt8SW1Zi+OfhklxQ9vV8uW8Vtb6sHP/pRjHWAi7bkcaH/uRgbKBrGS3kW1MRn HRBsIkZGwJY1xi9WnNfxe9qj7fwFFXiPWtAf1ipaXOjSWSWbv5tK1MPO4SYFvfkKhl93 cs5u7d2jCDLfv20WQ/0sjku1sv41PX8uU1FJmxBFpauzVu3Ljwblul2j6RR7aLcggowM 9h7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=C64q16PxaeutROTVXo1CCYw9UB56aDXX5askU1G2sJY=; b=lXF8c5FG70cKKvhGo0q7SOSEN7W6YgiqkhIuU7wdtcM9HA/oQ6w5vOHJ8KfVHWiSaU COKkLP+Blc5vudqgFUbD7faEYrYu+C9myKOKqc6hiic4MV/VmEquAWFvyFUCWXozb8Lb DMlKQ+FMzbcQzz69C8J5pexX5EE05FNTrq6mlTrYkQTFTRtarHQ5waR4N4093b4zCkWV VVUI5kRJzHK6fKglmPFLlj5oVgge0X7pQSLJq0r94R6coogh6Nv4JavR9g3XmRlNzHz9 TVqEXI6FE8w6uqj/7MfGy6/H3IsEAtcjYNvvLG0PSxxfft+XVmT4NGpBm49or5jgFGrl vK4w== X-Gm-Message-State: AOAM5308rpNof03zq9tbtgchZDEluqySVJLGqa9IdCg1WZkKBmYq0Ax+ oWBiABf4D3v1SbcE7/snNSA4WQ== X-Google-Smtp-Source: ABdhPJzpR1pSbT5HP1PBF74LPht5hr4i/so5djiGPErDCsyirnxo/z37cN4W9vfURnSNoTdHqzLYzQ== X-Received: by 2002:ac8:1699:: with SMTP id r25mr11170082qtj.302.1612105401471; Sun, 31 Jan 2021 07:03:21 -0800 (PST) Original-Received: from localhost.localdomain (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id q50sm11326363qtb.32.2021.01.31.07.03.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 31 Jan 2021 07:03:20 -0800 (PST) In-Reply-To: <878sabdqky.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 06 Dec 2020 14:14:21 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199008 Archived-At: Hi Lars, Lars Ingebrigtsen writes: > Thomas Fitzsimmons 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)