From: Lars Ingebrigtsen Date: Fri, 25 Dec 2015 19:21:46 +0000 (+0100) Subject: Allow http://user:pass@foo/ URLs again X-Git-Tag: emacs-25.0.90~383 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=24228d28dc97ca924a36f249365ad183ca4836c7;p=emacs.git Allow http://user:pass@foo/ URLs again * lisp/url/url-auth.el (url-basic-auth): Allow explicit user/passwords in URLs (bug#19046). Backport: (cherry picked from commit b563715a2db265517d5a77f165a42afa1e233fdd) --- diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index 31c15329ac6..75a9e387847 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -80,6 +80,9 @@ instead of the filename inheritance method." byserv (cdr-safe (assoc server (symbol-value url-basic-auth-storage)))) (cond + ((and user pass) + ;; Explicit http://user:pass@foo/ URL. Just return the credentials. + (setq retval (base64-encode-string (format "%s:%s" user pass)))) ((and prompt (not byserv)) (setq user (or (url-do-auth-source-search server type :user)