Fix auth-info-password
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 12 Jun 2024 08:24:34 +0000 (10:24 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 12 Jun 2024 08:24:34 +0000 (10:24 +0200)
* lisp/auth-source.el (auth-info-password): :secret can be a
cascaded function.

lisp/auth-source.el

index 5969cdbf9f8e087addcfb958f3eee7bc2a91530b..4dcf7d7371721c43df9da006010ac20e9a4c8c89 100644 (file)
@@ -874,9 +874,9 @@ while \(:host t) would find all host entries."
 (defun auth-info-password (auth-info)
   "Return the :secret password from the AUTH-INFO."
   (let ((secret (plist-get auth-info :secret)))
-    (if (functionp secret)
-        (funcall secret)
-      secret)))
+    (while (functionp secret)
+      (setq secret (funcall secret)))
+    secret))
 
 (defun auth-source-pick-first-password (&rest spec)
   "Pick the first secret found by applying `auth-source-search' to SPEC."