From c5f1c8a65299a8df4c66d11440afc753580ed7f1 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sat, 5 Oct 2013 11:52:05 +0200 Subject: [PATCH] Remove false cookies from the browser to avoid endless loops --- webcit/webcit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webcit/webcit.c b/webcit/webcit.c index 5b9078bbe..851829af9 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -314,6 +314,11 @@ void authorization_required(void) PACKAGE_STRING, ChrPtr(WC->serv_info->serv_software) ); hprintf("WWW-Authenticate: Basic realm=\"%s\"\r\n", ChrPtr(WC->serv_info->serv_humannode)); + + /* if this is a false cookie authentication, remove it to avoid endless loops. */ + if (StrLength(WCC->Hdr->HR.RawCookie) > 0) + stuff_to_cookie(1); + hprintf("Content-Type: text/html\r\n"); begin_burst(); wc_printf("

"); -- 2.30.2