From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.bugs Subject: Re: bug#4883: 23.1; url-http: wrong server name used for pwd lookup during proxy authentication Date: Tue, 17 Nov 2009 09:19:00 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87y6m5facb.fsf@lifelogs.com> References: <87vdhinnxw.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258472430 24298 80.91.229.12 (17 Nov 2009 15:40:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Nov 2009 15:40:30 +0000 (UTC) Cc: kai.tetzlaff@web.de To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 17 16:40:23 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NAQAB-0002b1-Ts for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Nov 2009 16:40:16 +0100 Original-Received: from localhost ([127.0.0.1]:51679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAQAB-000156-DW for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Nov 2009 10:40:15 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!newsfeed.freenet.de!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 53 Original-X-Trace: news.albasani.net InlD2A1CWR6ZWTdAujcnxZc1HsGz1yv/JqOAVHh8K1jSVPe8loOiccpb6gdz4eNr2+PWuQlFVarWaHtogGG2gWyK5/zz6Fzyhf8UnuGbJnqPlO9rZfLgR3fQO7BWeVKP Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Tue, 17 Nov 2009 15:19:01 +0000 (UTC) X-User-ID: fHAtoucdj2Uo1aTDo96XSZ+dynkn3zyP7GUYBP/QAl4= X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:gYpIjATotfTl/fwNhi+Kts4w26Q= sha1:D8JdjwFI9CNuJonVDb6SYlw2lH0= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) X-NNTP-Posting-Host: qjhJDuuKCariXz5mrKJTIcIoDwTjTZCAkjWCl+VIjyY= Original-Xref: news.stanford.edu gnu.emacs.bug:61004 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32667 Archived-At: On Tue, 10 Nov 2009 14:07:39 -0600 Ted Zlatanov wrote: TZ> On Sat, 07 Nov 2009 12:43:01 +0100 Kai Tetzlaff wrote: KT> There might be a better solution from someone who has a deeper understanding KT> of the code in the url lib. But the following solves the problem - at least KT> for my case: KT> Index: lisp/url/url-http.el KT> =================================================================== KT> RCS file: /cvsroot/emacs/emacs/lisp/url/url-http.el,v KT> retrieving revision 1.64 KT> diff -u -r1.64 url-http.el KT> --- lisp/url/url-http.el 1 Oct 2009 02:06:55 -0000 1.64 KT> +++ lisp/url/url-http.el 6 Nov 2009 10:25:02 -0000 KT> @@ -315,12 +315,16 @@ KT> '("basic"))) KT> (type nil) KT> (url (url-recreate-url url-current-object)) KT> - (url-basic-auth-storage 'url-http-real-basic-auth-storage) KT> + (auth-url (url-recreate-url KT> + (if (and proxy (boundp 'url-http-proxy)) KT> + url-http-proxy KT> + url-current-object))) KT> + (url-basic-auth-storage (if proxy KT> + ;; Cheating, but who cares? :) KT> + 'url-http-proxy-basic-auth-storage KT> + 'url-http-real-basic-auth-storage)) KT> auth KT> (strength 0)) KT> - ;; Cheating, but who cares? :) KT> - (if proxy KT> - (setq url-basic-auth-storage 'url-http-proxy-basic-auth-storage)) KT> ;; find strongest supported auth KT> (dolist (this-auth auths) KT> @@ -347,7 +351,7 @@ KT> " send it to " url-bug-address ".
") KT> (setq status t)) KT> (let* ((args (url-parse-args (subst-char-in-string ?, ?\; auth))) KT> - (auth (url-get-authentication url (cdr-safe (assoc "realm" args)) KT> + (auth (url-get-authentication auth-url (cdr-safe (assoc "realm" args)) KT> type t args))) KT> (if (not auth) KT> (setq success t) TZ> I introduced the auth-source hooks in url-http.el but the question of TZ> which URL needs to be authenticated is not something I considered. Can TZ> we hook the auth at a lower point? I'm concerned that if the proxy and TZ> the destination URL both need authentication, your proposal won't work. Kai, can you please follow up with your opinion? Thanks Ted