X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fauth.c;h=d37382f224d8a22c144114e7a5a19a6dff3e35dd;hb=e6a76e17884a941739d7109d927e03a25e390c63;hp=99e11606d04b875fce63a4102db21d74e7d2e68a;hpb=f5502938f1e4cac04e295dc05fe21293632ac1f0;p=citadel.git diff --git a/webcit/auth.c b/webcit/auth.c index 99e11606d..d37382f22 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -384,6 +384,7 @@ void finalize_openid_login(void) long HKLen; const char *HKey; HashPos *Cursor; + int len; Cursor = GetNewHashPos (WCC->Hdr->urlstrings, 0); while (GetNextHashPos(WCC->Hdr->urlstrings, Cursor, &HKLen, &HKey, &U)) { @@ -396,7 +397,9 @@ void finalize_openid_login(void) serv_puts("000"); linecount = 0; - while (StrBuf_ServGetln(Buf), strcmp(ChrPtr(Buf), "000")) + while (len = StrBuf_ServGetln(Buf), + ((len >= 0) && + ((len != 3) || strcmp(ChrPtr(Buf), "000") ))) { if (linecount == 0) result = NewStrBufDup(Buf); if (!strcasecmp(ChrPtr(result), "authenticate")) {