]> git.eshelyaron.com Git - emacs.git/commitdiff
auth-source: Fix wrong-type-argument when searching plstore
authorDaiki Ueno <ueno@gnu.org>
Tue, 15 Oct 2019 10:42:37 +0000 (12:42 +0200)
committerDaiki Ueno <ueno@gnu.org>
Tue, 15 Oct 2019 10:49:45 +0000 (12:49 +0200)
`auth-source-search' can be called with an integer port number from
`network-stream-certificate`, while the backend implementation doesn't
allow non-string attributes.

* lisp/auth-source.el (auth-source-plstore-search): Ensure attributes
are string.

lisp/auth-source.el

index 1d3d8dba405c16b7a404567f8c5c0074ceeb1e6b..fdd869df3a6b585cc0b0f1c0a1e75cf7ad83e6ac 100644 (file)
@@ -2049,9 +2049,9 @@ entries for git.gnus.org:
                                           (if (or (null v)
                                                   (eq t v))
                                               nil
-                                            (if (stringp v)
-                                                (setq v (list v)))
-                                            (list k v))))
+                                            (list
+                                             k
+                                             (auth-source-ensure-strings v)))))
                                       search-keys)))
          ;; needed keys (always including host, login, port, and secret)
          (returned-keys (delete-dups (append