The monitoring page plays really stupid games with the session. Eliminate all.
authorArt Cancro <ajc@uncensored.citadel.org>
Sun, 24 Jul 2011 18:30:21 +0000 (14:30 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 21:41:45 +0000 (21:41 +0000)
webcit/auth.c

index 656dfdc6f40a45a92e5ce953dcb8fe083487dce2..994c00c976322826aed4032210effee66d5b41b0 100644 (file)
@@ -565,33 +565,20 @@ void do_logout(void)
  */
 void monitor(void)
 {
-       wcsession *WCC = WC;
-       char buf[SIZ];
-
-       FlushStrBuf(WCC->wc_username);
-       FlushStrBuf(WCC->wc_password);
-       FlushStrBuf(WCC->wc_fullname);
-       FlushRoomlist();
-
-       serv_puts("LOUT");
-       serv_getln(buf, sizeof buf);
-       WCC->logged_in = 0;
+       output_headers(0, 0, 0, 0, 0, 0);
 
-       FlushStrBuf(WCC->CurRoom.name);
-
-       /* Calling output_headers() this way causes the cookies to be un-set */
-       output_headers(1, 0, 0, 1, 1, 0);
+       hprintf("Content-type: text/plain\r\n"
+               "Server: " PACKAGE_STRING "\r\n"
+               "Connection: close\r\n"
+       );
+       begin_burst();
 
-       wc_printf("<html><body><tt>");
-       wc_printf("<strong>WebCit monitoring screen</strong><br>\n");
-       wc_printf("Connection to Citadel server at %s:%s : %s<br>\n",
+       wc_printf("Connection to Citadel server at %s:%s : %s\r\n",
                ctdlhost, ctdlport,
                (WC->connected ? "SUCCESS" : "FAIL")
        );
-       wc_printf("</body></html>\n");
 
-       wDumpContent(2);
-       end_webcit_session();
+       wDumpContent(0);
 }