]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow http://user:pass@foo/ URLs again
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 25 Dec 2015 19:21:46 +0000 (20:21 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 25 Dec 2015 19:22:02 +0000 (20:22 +0100)
* lisp/url/url-auth.el (url-basic-auth): Allow explicit
user/passwords in URLs (bug#19046).

Backport:

(cherry picked from commit b563715a2db265517d5a77f165a42afa1e233fdd)

lisp/url/url-auth.el

index 31c15329ac6bbd55d84260ed2d72d933f9157758..75a9e3878474cdd3761d8016fa725fb2db1e596d 100644 (file)
@@ -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)