summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--server.c2
-rw-r--r--state.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/server.c b/server.c
index a304db0..5d985cb 100644
--- a/server.c
+++ b/server.c
@@ -159,7 +159,7 @@ void serverLogin(
 
 void serverAuth(void) {
 	assert(authPlain);
-	serverFormat("AUTHENTICATE %s\r\nCAP END\r\n", authPlain);
+	serverFormat("AUTHENTICATE %s\r\n", authPlain);
 	free(authPlain);
 	authPlain = NULL;
 }
diff --git a/state.c b/state.c
index 01829a4..c63a6b2 100644
--- a/state.c
+++ b/state.c
@@ -130,6 +130,16 @@ static void handleAuthenticate(struct Message *msg) {
 	serverAuth();
 }
 
+static void handleReplyLoggedIn(struct Message *msg) {
+	(void)msg;
+	serverFormat("CAP END\r\n");
+}
+
+static void handleErrorSASLFail(struct Message *msg) {
+	if (!msg->params[1]) errx(EX_PROTOCOL, "RPL_SASLFAIL without message");
+	errx(EX_CONFIG, "%s", msg->params[1]);
+}
+
 static void handleReplyWelcome(struct Message *msg) {
 	if (!msg->params[1]) errx(EX_PROTOCOL, "RPL_WELCOME without message");
 	set(&intro.origin, msg->origin);
@@ -233,6 +243,10 @@ static const struct {
 	{ "005", handleReplyISupport },
 	{ "332", handleReplyTopic },
 	{ "433", handleErrorNicknameInUse },
+	{ "900", handleReplyLoggedIn },
+	{ "904", handleErrorSASLFail },
+	{ "905", handleErrorSASLFail },
+	{ "906", handleErrorSASLFail },
 	{ "AUTHENTICATE", handleAuthenticate },
 	{ "CAP", handleCap },
 	{ "ERROR", handleError },
che.c?id=43620cf6aa62decaf319d00c28297e3b87a4da78&follow=1'>cache.c: fix header orderJohn Keeping 2015-08-13configfile.c: don't include system headers directlyJohn Keeping 2015-08-13Remove redundant includesJohn Keeping 2015-08-13Makefile: include Git's config.mak.unameJohn Keeping 2015-08-13tests: allow shell to be overriddenJohn Keeping 2015-08-13redirect: cleanlinessJason A. Donenfeld 2015-08-13redirect: be more careful for different cgi setupsJason A. Donenfeld 2015-08-12ui-log: fix double countingJohn Keeping 2015-08-12log: allow users to follow a fileJohn Keeping 2015-08-12shared: make cgit_diff_tree_cb publicJohn Keeping 2015-08-12t0110: Chain together using &&Jason A. Donenfeld 2015-08-12about: always ensure page has a trailing slashJason A. Donenfeld 2015-08-12filters: apply HTML escapingLazaros Koromilas 2015-08-12git: update to v2.5.0Christian Hesse 2015-08-12Fix processing of repo.hide and repo.ignoreDaniel Reichelt