Don't casemap erc-sasl-user when set to :nick

* lisp/erc/erc-sasl.el (erc-sasl-user): Fix doc string.
(erc-sasl--get-user): Don't apply casemapping when the option
`erc-sasl-user' is set to `:nick'.  While many servers and
auth-services providers perform case-folding when comparing SASL
usernames, only some recognize RFC1459 mappings, which ERC previously
applied blindly.  Instead, ERC now behaves like other clients in
leaving such preparation in the hands of the server.  This bug was
introduced with changes new to ERC 5.5 and Emacs 29 (bug#29108).
This commit is contained in:
F. Jason Park 2023-02-03 06:01:04 -08:00
parent e444115d02
commit c3f58a6651

View file

@ -67,12 +67,11 @@ Note that any value other than nil or `external' likely requires
(defcustom erc-sasl-user :user
"Account username to send when authenticating.
This is also referred to as the authentication identity or
This option specifies the SASL authentication identity, or
\"authcid\". A value of `:user' or `:nick' indicates that the
corresponding connection parameter on file should be used. These
are most often derived from arguments provided to the `erc' and
`erc-tls' entry points. In the case of `:nick', a downcased
version is used."
corresponding connection parameter on file should be used. ERC
typically obtains these from arguments given to its entry-point
commands, `erc' and `erc-tls'."
:type '(choice string (const :user) (const :nick)))
(defcustom erc-sasl-password :password
@ -129,7 +128,7 @@ integration."
(defun erc-sasl--get-user ()
(pcase (alist-get 'user erc-sasl--options)
(:user erc-session-username)
(:nick (erc-downcase (erc-current-nick)))
(:nick (erc-current-nick))
(v v)))
(defun erc-sasl-auth-source-password-as-host (&rest plist)