]> git.eshelyaron.com Git - emacs.git/commit
Allow login to contain NUH delimiters in erc-parse-user
authorF. Jason Park <jp@neverwas.me>
Sat, 2 Sep 2023 03:05:35 +0000 (20:05 -0700)
committerF. Jason Park <jp@neverwas.me>
Mon, 11 Sep 2023 00:58:20 +0000 (17:58 -0700)
commitc96a626dce2a12d1415e0d2c6e9eaeac8c5a1d75
tree7bf905d6619d5287117070a5d0a99ed901433c64
parentb5df39e924ba5d9eb1a1adc4b308eb983126d444
Allow login to contain NUH delimiters in erc-parse-user

* lisp/erc/erc.el (erc--parse-user-regexp-legacy,
erc--parse-user-regexp-pedantic): New constants.  The first is the
original pattern that matches across line endings.  The second
disallows multiline strings and interprets excess delimiting
characters as part of the middle, "user" component as per RFC1459.
The latter distinction is largely academic because most servers reject
such logins anyway, but bridges to other protocols and future
extensions may need to exploit this for novel uses.
(erc--parse-user-regexp): New variable, currently set to
`erc--parse-user-regexp-legacy'.
(erc-parse-user): Keep original pattern as default, but do so
indirectly via `erc--parse-user-regexp'.
* test/lisp/erc/erc-tests.el (erc-parse-user): New test.
lisp/erc/erc.el
test/lisp/erc/erc-tests.el