diff options
| author | F. Jason Park | 2022-11-24 21:03:03 -0800 |
|---|---|---|
| committer | F. Jason Park | 2022-11-25 05:37:01 -0800 |
| commit | 3d02c8aabfde88219dd8b6053a59de261308bc2f (patch) | |
| tree | 7720ff6524d15f2231319bbacc3f6bf9362b0e52 /lisp/auth-source-pass.el | |
| parent | 94a8a8c4fef074f445d316000070c95f0452586e (diff) | |
| download | emacs-3d02c8aabfde88219dd8b6053a59de261308bc2f.tar.gz emacs-3d02c8aabfde88219dd8b6053a59de261308bc2f.zip | |
Disable auth-source-pass-extra-query-keywords by default
* doc/misc/auth.texi: Mention subdomain matching in
`auth-source-pass-extra-query-keywords' section.
* etc/NEWS: Mention the loss of traditional auth-source-pass features
when `auth-source-pass-extra-query-keywords' is enabled.
* lisp/auth-source-pass (auth-source-pass-extra-query-keywords): Set
default to nil. Mention domain matching in doc string.
(auth-source-pass--match-regexp): Allow username to contain "@".
* lisp/erc/erc-compat.el:
(erc-compat--29-auth-source-pass--retrieve-parsed): Adjust regexp.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass-extra-query-keywords--suffixed-user): make plain
username more email-like.
(Bug#58985.)
Diffstat (limited to 'lisp/auth-source-pass.el')
| -rw-r--r-- | lisp/auth-source-pass.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/auth-source-pass.el b/lisp/auth-source-pass.el index dc274843e10..74d38084480 100644 --- a/lisp/auth-source-pass.el +++ b/lisp/auth-source-pass.el | |||
| @@ -55,12 +55,13 @@ | |||
| 55 | :type 'string | 55 | :type 'string |
| 56 | :version "27.1") | 56 | :version "27.1") |
| 57 | 57 | ||
| 58 | (defcustom auth-source-pass-extra-query-keywords t | 58 | (defcustom auth-source-pass-extra-query-keywords nil |
| 59 | "Whether to consider additional keywords when performing a query. | 59 | "Whether to consider additional keywords when performing a query. |
| 60 | Specifically, when the value is t, recognize the `:max' and | 60 | Specifically, when the value is t, recognize the `:max' and |
| 61 | `:require' keywords and accept lists of query parameters for | 61 | `:require' keywords and accept lists of query parameters for |
| 62 | certain keywords, such as `:host' and `:user'. Also, wrap all | 62 | certain keywords, such as `:host' and `:user'. Beyond that, wrap |
| 63 | returned secrets in a function and forgo any further results | 63 | all returned secrets in a function and don't bother considering |
| 64 | subdomains when matching hosts. Also, forgo any further results | ||
| 64 | filtering unless given an applicable `:require' argument. When | 65 | filtering unless given an applicable `:require' argument. When |
| 65 | this option is nil, do none of that, and enact the narrowing | 66 | this option is nil, do none of that, and enact the narrowing |
| 66 | behavior described toward the bottom of the Info node `(auth) The | 67 | behavior described toward the bottom of the Info node `(auth) The |
| @@ -110,7 +111,7 @@ HOSTS can be a string or a list of strings." | |||
| 110 | (defun auth-source-pass--match-regexp (s) | 111 | (defun auth-source-pass--match-regexp (s) |
| 111 | (rx-to-string ; autoloaded | 112 | (rx-to-string ; autoloaded |
| 112 | `(: (or bot "/") | 113 | `(: (or bot "/") |
| 113 | (or (: (? (group-n 20 (+ (not (in ?\ ?/ ?@ ,s)))) "@") | 114 | (or (: (? (group-n 20 (+ (not (in ?\ ?/ ,s)))) "@") |
| 114 | (group-n 10 (+ (not (in ?\ ?/ ?@ ,s)))) | 115 | (group-n 10 (+ (not (in ?\ ?/ ?@ ,s)))) |
| 115 | (? ,s (group-n 30 (+ (not (in ?\ ?/ ,s)))))) | 116 | (? ,s (group-n 30 (+ (not (in ?\ ?/ ,s)))))) |
| 116 | (: (group-n 11 (+ (not (in ?\ ?/ ?@ ,s)))) | 117 | (: (group-n 11 (+ (not (in ?\ ?/ ?@ ,s)))) |