[Top][All Lists]

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

Re: bug#4883: 23.1; url-http: wrong server name used for pwd lookup duri

From: Ted Zlatanov
Subject: Re: bug#4883: 23.1; url-http: wrong server name used for pwd lookup during proxy authentication
Date: Tue, 10 Nov 2009 14:07:39 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux)

On Sat, 07 Nov 2009 12:43:01 +0100 Kai Tetzlaff <address@hidden> 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 ".<hr>")
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" 
KT>                                        type t args)))
KT>     (if (not auth)
KT>         (setq success t)

I introduced the auth-source hooks in url-http.el but the question of
which URL needs to be authenticated is not something I considered.  Can
we hook the auth at a lower point?  I'm concerned that if the proxy and
the destination URL both need authentication, your proposal won't work.


reply via email to

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