From 6eedb358f64b1ec5d8fa749fde24c1634191f1e8 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sat, 29 Jan 2011 15:47:31 -0500 Subject: [PATCH] Send the correct data to become_logged_in() during self service user creation. We needed to send it the output of NEWU, not the output of SETP. --- webcit/auth.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/webcit/auth.c b/webcit/auth.c index be62db447..16ff9ce64 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -167,21 +167,21 @@ void ajax_login_username_password(void) { * modal/ajax version of 'new user' (username and password) */ void ajax_login_newuser(void) { - StrBuf *Buf = NewStrBuf(); + StrBuf *NBuf = NewStrBuf(); + StrBuf *SBuf = NewStrBuf(); serv_printf("NEWU %s", bstr("name")); - StrBuf_ServGetln(Buf); - if (GetServerStatus(Buf, NULL) == 2) { + StrBuf_ServGetln(NBuf); + if (GetServerStatus(NBuf, NULL) == 2) { + become_logged_in(sbstr("name"), sbstr("pass"), NBuf); serv_printf("SETP %s", bstr("pass")); - StrBuf_ServGetln(Buf); - if (GetServerStatus(Buf, NULL) == 2) { - become_logged_in(sbstr("name"), sbstr("pass"), Buf); - } + StrBuf_ServGetln(SBuf); } /* The client is expecting to read back a citadel protocol response */ - wc_printf("%s", ChrPtr(Buf)); - FreeStrBuf(&Buf); + wc_printf("%s", ChrPtr(NBuf)); + FreeStrBuf(&NBuf); + FreeStrBuf(&SBuf); } -- 2.30.2