[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d899519221b 2/3: Allow querying auth-source with port as string i
From: |
F. Jason Park |
Subject: |
master d899519221b 2/3: Allow querying auth-source with port as string in ERC |
Date: |
Sun, 1 Dec 2024 13:57:42 -0500 (EST) |
branch: master
commit d899519221b23a895672a100f63410ffb8b8b1e4
Author: Trevor Arjeski <tmarjeski@gmail.com>
Commit: F. Jason Park <jp@neverwas.me>
Allow querying auth-source with port as string in ERC
* lisp/erc/erc.el (erc--auth-source-determine-params-defaults): Allow
arbitrary strings for `ers-session-port'. Previously, if a port/service
was any string other than "irc", the auth-source query would fail for a
seemingly unknown reason. Restricting the value to "irc" is unnecessary
since "irc" is already added to the list of ports, and
`make-network-process' already consults /etc/services for well-known
service names, like "ircs-u", etc. This change allows a user to (setopt
erc-port "1234"), intentionally or accidentally, while still being able
to use .authinfo for password management. (Bug#74516)
Copyright-paperwork-exempt: yes
---
lisp/erc/erc.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index e77cb02819d..ab31696b669 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -4674,8 +4674,9 @@ node `(erc) auth-source'."
(list net erc-server-announced-name erc-session-server)))
(ports (list (cl-typecase erc-session-port
(integer (number-to-string erc-session-port))
- (string (and (string= erc-session-port "irc")
- erc-session-port)) ; or nil
+ (string (and (not (member erc-session-port
+ '("" "irc")))
+ erc-session-port))
(t erc-session-port))
"irc")))
(list (cons :host (delq nil hosts))