`auth-source-search' can be called with an integer port number,
while the backend implementation doesn't allow non-string attributes.
* doc/misc/auth.texi (Secret Service API): Attribute values are
stringified.
* lisp/auth-source.el (auth-source-secrets-search):
Ensure attributes are string. (Bug#55199)
@var{item} and password @var{password}. The label @var{item} does not
have to be unique in @var{collection}. @var{attributes} are key-value
pairs set for the created item. The keys are keyword symbols,
-starting with a colon. Example:
+starting with a colon; values are strings. Example:
@example
;;; The collection is "session", the label is "my item"
"~/.authinfo.gpg"))
@end example
+Attribute values in the auth-source spec, which are not strings (like
+port numbers), are stringified prior calling the @file{secrets.el}
+functions.
+
@node The Unix password store
@chapter The Unix password store
(search-specs (auth-source-secrets-listify-pattern
(apply #'append (mapcar
(lambda (k)
- (if (or (null (plist-get spec k))
- (eq t (plist-get spec k)))
- nil
- (list k (plist-get spec k))))
+ (let ((v (plist-get spec k)))
+ (if (or (null v)
+ (eq t v))
+ nil
+ (list
+ k
+ (auth-source-ensure-strings v)))))
search-keys))))
;; needed keys (always including host, login, port, and secret)
(returned-keys (delete-dups (append