aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorF. Jason Park2022-11-24 21:03:03 -0800
committerF. Jason Park2022-11-25 05:37:01 -0800
commit3d02c8aabfde88219dd8b6053a59de261308bc2f (patch)
tree7720ff6524d15f2231319bbacc3f6bf9362b0e52 /test
parent94a8a8c4fef074f445d316000070c95f0452586e (diff)
downloademacs-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 'test')
-rw-r--r--test/lisp/auth-source-pass-tests.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/lisp/auth-source-pass-tests.el b/test/lisp/auth-source-pass-tests.el
index 6e6671efca5..1107e09b51b 100644
--- a/test/lisp/auth-source-pass-tests.el
+++ b/test/lisp/auth-source-pass-tests.el
@@ -697,29 +697,29 @@ machine Libera.Chat password b
697;; with slightly more realistic and less legible values. 697;; with slightly more realistic and less legible values.
698 698
699(ert-deftest auth-source-pass-extra-query-keywords--suffixed-user () 699(ert-deftest auth-source-pass-extra-query-keywords--suffixed-user ()
700 (let ((store (sort (copy-sequence '(("x.com:42/bar" (secret . "a")) 700 (let ((store (sort (copy-sequence '(("x.com:42/b@r" (secret . "a"))
701 ("bar@x.com" (secret . "b")) 701 ("b@r@x.com" (secret . "b"))
702 ("x.com" (secret . "?")) 702 ("x.com" (secret . "?"))
703 ("bar@y.org" (secret . "c")) 703 ("b@r@y.org" (secret . "c"))
704 ("fake.com" (secret . "?")) 704 ("fake.com" (secret . "?"))
705 ("fake.com/bar" (secret . "d")) 705 ("fake.com/b@r" (secret . "d"))
706 ("y.org/bar" (secret . "?")) 706 ("y.org/b@r" (secret . "?"))
707 ("bar@fake.com" (secret . "e")))) 707 ("b@r@fake.com" (secret . "e"))))
708 (lambda (&rest _) (zerop (random 2)))))) 708 (lambda (&rest _) (zerop (random 2))))))
709 (auth-source-pass--with-store store 709 (auth-source-pass--with-store store
710 (auth-source-pass-enable) 710 (auth-source-pass-enable)
711 (let* ((auth-source-pass-extra-query-keywords t) 711 (let* ((auth-source-pass-extra-query-keywords t)
712 (results (auth-source-search :host '("x.com" "fake.com" "y.org") 712 (results (auth-source-search :host '("x.com" "fake.com" "y.org")
713 :user "bar" 713 :user "b@r"
714 :require '(:user) :max 5))) 714 :require '(:user) :max 5)))
715 (dolist (result results) 715 (dolist (result results)
716 (setf (plist-get result :secret) (auth-info-password result))) 716 (setf (plist-get result :secret) (auth-info-password result)))
717 (should (equal results 717 (should (equal results
718 '((:host "x.com" :user "bar" :secret "b") 718 '((:host "x.com" :user "b@r" :secret "b")
719 (:host "x.com" :user "bar" :port "42" :secret "a") 719 (:host "x.com" :user "b@r" :port "42" :secret "a")
720 (:host "fake.com" :user "bar" :secret "e") 720 (:host "fake.com" :user "b@r" :secret "e")
721 (:host "fake.com" :user "bar" :secret "d") 721 (:host "fake.com" :user "b@r" :secret "d")
722 (:host "y.org" :user "bar" :secret "c")))))))) 722 (:host "y.org" :user "b@r" :secret "c"))))))))
723 723
724;; This is a more distilled version of `suffixed-user', above. It 724;; This is a more distilled version of `suffixed-user', above. It
725;; better illustrates that search order takes precedence over "/user" 725;; better illustrates that search order takes precedence over "/user"