diff options
author | Keith Amidon <camalot@picnicpark.org> | 2019-02-14 10:27:31 -0800 |
---|---|---|
committer | Damien Cassou <damien@cassou.me> | 2019-06-24 09:15:40 +0200 |
commit | 94c9eb81b8b265380345c36c0a481d9022435d89 (patch) | |
tree | 2903d5a21119fa80efd9f5c48073dc09155286c3 /lisp/auth-source-pass.el | |
parent | 2a0a05789d4734e4b3d18941346ecda9834e7cc9 (diff) | |
download | emacs-94c9eb81b8b265380345c36c0a481d9022435d89.tar.gz |
Fix auth-source-pass to search for hostname:port/username
auth-source-pass supports entries with username either prefixed to the
hostname with an @ as separator or in a subdirectory under the
hostname. This was true when there was no port or service included in
the name, but got broken with the introduction of
auth-source-pass-port-separator.
* lisp/auth-source-pass.el (auth-source-pass--find-match-unambiguous): Fix
to match hostname:port/username.
* test/lisp/auth-source-pass-tests.el: Add corresponding tests.
Diffstat (limited to 'lisp/auth-source-pass.el')
-rw-r--r-- | lisp/auth-source-pass.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/auth-source-pass.el b/lisp/auth-source-pass.el index 626dbf842c1..4aa0853be94 100644 --- a/lisp/auth-source-pass.el +++ b/lisp/auth-source-pass.el @@ -262,6 +262,9 @@ HOSTNAME should not contain any username or port number." (and user port (auth-source-pass--find-one-by-entry-name (format "%s@%s%s%s" user hostname auth-source-pass-port-separator port) user)) + (and user port (auth-source-pass--find-one-by-entry-name + (format "%s%s%s" hostname auth-source-pass-port-separator port) + user)) (and user (auth-source-pass--find-one-by-entry-name (format "%s@%s" user hostname) user)) |