[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a7a22e7c22c: Fix secret search with basic auth with a port in URL
From: |
Eli Zaretskii |
Subject: |
master a7a22e7c22c: Fix secret search with basic auth with a port in URL |
Date: |
Sat, 24 Aug 2024 04:58:43 -0400 (EDT) |
branch: master
commit a7a22e7c22cef0948f84daa86c9929d7b0dd6d56
Author: Björn Bidar <bjorn.bidar@thaodan.de>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix secret search with basic auth with a port in URL
* lisp/url/url-auth.el (url-basic-auth): Fix retrieving of
secrets when the URL contains a port. Amending the port to
server breaks 'auth-source-search' matching for :host which
is redundant as it already specified in :port. (Bug#72526)
---
lisp/url/url-auth.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index 8f4df780a54..c73047da6b3 100644
--- a/lisp/url/url-auth.el
+++ b/lisp/url/url-auth.el
@@ -72,8 +72,7 @@ instead of the filename inheritance method."
(pass (url-password href))
(enable-recursive-minibuffers t) ; for url-handler-mode (bug#10298)
byserv retval data)
- (setq server (format "%s:%d" server port)
- file (cond
+ (setq file (cond
(realm realm)
((string= "" file) "/")
((string-match "/$" file) file)
@@ -94,6 +93,7 @@ instead of the filename inheritance method."
(url-do-auth-source-search server type :secret)
(and (url-interactive-p)
(read-passwd "Password: " nil (or pass "")))))
+ (setq server (format "%s:%d" server port))
(set url-basic-auth-storage
(cons (list server
(cons file
@@ -129,6 +129,7 @@ instead of the filename inheritance method."
(url-do-auth-source-search server type :secret)
(and (url-interactive-p)
(read-passwd "Password: ")))
+ server (format "%s:%d" server port)
retval (base64-encode-string (format "%s:%s" user pass) t)
byserv (assoc server (symbol-value url-basic-auth-storage)))
(setcdr byserv
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a7a22e7c22c: Fix secret search with basic auth with a port in URL,
Eli Zaretskii <=