From: David Engster <deng@randomsample.de>
To: 11981@debbugs.gnu.org
Subject: bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source
Date: Wed, 18 Jul 2012 20:38:48 +0200 [thread overview]
Message-ID: <87eho8didj.fsf@engster.org> (raw)
The function `url-http-parse-headers' temporarily disables all file name
handlers to circumvent a bug where Tramp could kick in because the URL
might look like a remote file (#6717). This is the offending snippet:
;; The filename part of a URL could be in remote file syntax,
;; see Bug#6717 for an example. We disable file name
;; handlers, therefore.
(file-name-handler-alist nil))
However, this workaraound assumes that everything that gets afterwards
in the `let'-section does not depend on file name handlers. However,
this is not the case: `url-http-handle-authentication' is called which
in turn calls the auth-source package. This package however supports
encrypted authinfo files which have to be automatically decrypted
through `auto-encryption-mode'. This, of course, works through file name
handlers.
Here's a backtrace from `auth-source-search' resulting from a call to
`url-retrieve-synchronously' on a password-protected URL:
auth-source-search(:max 1 :host "www.google.com:443" :port "https")
url-do-auth-source-search("www.google.com:443" "https" :user)
url-basic-auth([cl-struct-url "https" nil nil "www.google.com" 443 "/calendar/dav/MY-GOOGLE-ACCOUNT/events/" nil nil t nil t] t nil "Google CalDAV" (("realm" . "Google CalDAV") ("basic")))
url-get-authentication("https://www.google.com/calendar/dav/MY-GOOGLE-ACCOUNT/events/" "Google CalDAV" "basic" t (("realm" . "Google CalDAV") ("basic")))
url-http-handle-authentication(nil)
[ ... ]
url-http-parse-headers()
url-http-chunked-encoding-after-change-function(500 507 7)
url-http-generic-filter(#<process www.google.com<1>> "\n0\n\n")
[ ... ]
url-retrieve-synchronously("https://www.google.com/calendar/dav/MY-GOOGLE-ACCOUNT/events/")
Note that after `url-http-parse-headers' the variable
`file-name-handler-alist' is set to 'nil', thus when
`auth-source-search' loads an encrypted authinfo.gpg file, it won't
automatically get decrypted.
-David
next reply other threads:[~2012-07-18 18:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 18:38 David Engster [this message]
2012-07-19 6:35 ` bug#11981: 24.1.50; url-http-parse-headers should not disable file name handlers since it breaks auth-source Michael Albinus
2012-07-19 8:55 ` Stefan Monnier
2012-07-19 12:51 ` David Engster
2012-07-21 14:31 ` David Engster
2012-08-06 16:01 ` Stefan Monnier
2012-08-06 17:18 ` Jan Djärv
2012-08-12 14:52 ` David Engster
2012-08-12 17:36 ` Stefan Monnier
2012-08-13 19:23 ` David Engster
2012-08-14 14:55 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eho8didj.fsf@engster.org \
--to=deng@randomsample.de \
--cc=11981@debbugs.gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.