~emersion/soju-dev

Send ERR_NEEDMOREPARAMS when AUTHENTICATE needs more params v1 REJECTED

Hubert Hirtz: 1
 Send ERR_NEEDMOREPARAMS when AUTHENTICATE needs more params

 1 files changed, 1 insertions(+), 4 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/soju-dev/patches/12003/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Send ERR_NEEDMOREPARAMS when AUTHENTICATE needs more params Export this patch

... instead of ERR_SASLFAIL with a custom message.
---

I know this is a nit but IRC doesn't need any more error codes to tell a
message needs more params.

 downstream.go | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/downstream.go b/downstream.go
index 67b6d68..9ccb00a 100644
--- a/downstream.go
+++ b/downstream.go
@@ -360,10 +360,7 @@ func (dc *downstreamConn) handleMessageUnregistered(msg *irc.Message) error {
			}}
		}
		if len(msg.Params) == 0 {
			return ircError{&irc.Message{
				Command: irc.ERR_SASLFAIL,
				Params:  []string{"*", "Missing AUTHENTICATE argument"},
			}}
			return newNeedMoreParamsError(msg.Command)
		}
		if dc.nick == "" {
			return ircError{&irc.Message{
-- 
2.28.0
I'm a little worried about clients expecting an ERR_SASL* in response
to AUTHENTICATE, and getting stuck if they receive something else.