diff options
| author | Lars Ingebrigtsen | 2015-12-25 20:21:46 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2015-12-25 20:21:46 +0100 |
| commit | b563715a2db265517d5a77f165a42afa1e233fdd (patch) | |
| tree | 0a1033127e492645b394ecb2721c5e335404698a | |
| parent | 596338b3b9b946c6948fd57369fdced9ea50afa3 (diff) | |
| download | emacs-b563715a2db265517d5a77f165a42afa1e233fdd.tar.gz emacs-b563715a2db265517d5a77f165a42afa1e233fdd.zip | |
Allow http://user:pass@foo/ URLs again
* lisp/url/url-auth.el (url-basic-auth): Allow explicit
user/passwords in URLs (bug#19046).
| -rw-r--r-- | lisp/url/url-auth.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index 87f67183b55..b419db58ca9 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el | |||
| @@ -80,6 +80,9 @@ instead of the filename inheritance method." | |||
| 80 | byserv (cdr-safe (assoc server | 80 | byserv (cdr-safe (assoc server |
| 81 | (symbol-value url-basic-auth-storage)))) | 81 | (symbol-value url-basic-auth-storage)))) |
| 82 | (cond | 82 | (cond |
| 83 | ((and user pass) | ||
| 84 | ;; Explicit http://user:pass@foo/ URL. Just return the credentials. | ||
| 85 | (setq retval (base64-encode-string (format "%s:%s" user pass)))) | ||
| 83 | ((and prompt (not byserv)) | 86 | ((and prompt (not byserv)) |
| 84 | (setq user (or | 87 | (setq user (or |
| 85 | (url-do-auth-source-search server type :user) | 88 | (url-do-auth-source-search server type :user) |