[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 32afdcca881: Forward user to auth-source inside url-basic-auth
From: |
Eli Zaretskii |
Subject: |
master 32afdcca881: Forward user to auth-source inside url-basic-auth |
Date: |
Sat, 24 Aug 2024 08:50:52 -0400 (EDT) |
branch: master
commit 32afdcca8815331f1231fe9d8279ab9914197381
Author: Björn Bidar <bjorn.bidar@thaodan.de>
Commit: Eli Zaretskii <eliz@gnu.org>
Forward user to auth-source inside url-basic-auth
* lisp/url/url-auth.el (url-basic-auth): Forward the user if
provided by the url or found by 'auth-source' when searching
for secrets. Supplying 'auth-source' with the user when
matching secrets allows for more accurate retrieval and fixes
instances where the user enters an url that already contains
the user such as "user@host.de". (Bug#72526)
---
lisp/url/url-auth.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index c73047da6b3..d7d7701b364 100644
--- a/lisp/url/url-auth.el
+++ b/lisp/url/url-auth.el
@@ -90,7 +90,7 @@ instead of the filename inheritance method."
(read-string (url-auth-user-prompt href realm)
(or user (user-real-login-name)))))
pass (or
- (url-do-auth-source-search server type :secret)
+ (url-do-auth-source-search server type :secret user)
(and (url-interactive-p)
(read-passwd "Password: " nil (or pass "")))))
(setq server (format "%s:%d" server port))
@@ -126,7 +126,7 @@ instead of the filename inheritance method."
(read-string (url-auth-user-prompt href realm)
(user-real-login-name))))
pass (or
- (url-do-auth-source-search server type :secret)
+ (url-do-auth-source-search server type :secret user)
(and (url-interactive-p)
(read-passwd "Password: ")))
server (format "%s:%d" server port)
@@ -461,8 +461,8 @@ challenge such as nonce and opaque."
"A list of the registered authorization schemes and various and sundry
information associated with them.")
-(defun url-do-auth-source-search (server type parameter)
- (let* ((auth-info (auth-source-search :max 1 :host server :port type))
+(defun url-do-auth-source-search (server type parameter &optional user)
+ (let* ((auth-info (auth-source-search :max 1 :host server :port type :user
user))
(auth-info (nth 0 auth-info))
(token (plist-get auth-info parameter))
(token (if (functionp token) (funcall token) token)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 32afdcca881: Forward user to auth-source inside url-basic-auth,
Eli Zaretskii <=