From: Art Cancro Date: Wed, 18 Feb 2004 19:17:51 +0000 (+0000) Subject: * Force reload of frameset if someone tries to escape it. Not perfect X-Git-Tag: v7.86~5600 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=9981932bdfb017dba623e742bd5fa89b35a5ae8c;p=citadel.git * Force reload of frameset if someone tries to escape it. Not perfect but it mostly works at this poing. --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 921bb9683..bc211bec2 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,8 @@ $Log$ +Revision 504.5 2004/02/18 19:17:51 ajc +* Force reload of frameset if someone tries to escape it. Not perfect + but it mostly works at this poing. + Revision 504.4 2004/02/17 03:37:11 ajc * Indicate to Citadel that we want Server Generated Invitations when calendar events are saved. (No longer the default in Citadel server.) @@ -1650,3 +1654,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/context_loop.c b/webcit/context_loop.c index 7d5abac3c..037d3c1a8 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -335,6 +335,7 @@ void context_loop(int sock) if ( (!strcasecmp(buf, "/")) || (!strcasecmp(buf, "/static/mainframeset.html")) || (!strcasecmp(buf, "/static/robots.txt")) + || (!strncasecmp(buf, "/page_popup", 11)) || (!strncasecmp(buf, "/listsub", 8)) || (!strncasecmp(buf, "/freebusy", 9)) || (!strncasecmp(buf, "/termquit", 9)) ) { diff --git a/webcit/paging.c b/webcit/paging.c index 690aa6db1..aeaf7aab5 100644 --- a/webcit/paging.c +++ b/webcit/paging.c @@ -149,7 +149,7 @@ void page_popup(void) char buf[SIZ]; char pagefrom[SIZ]; - /* suppress express message check, do headers but no fake frames */ + /* suppress express message check, do headers but no frames */ output_headers(0x08 | 0x03); while (serv_puts("GEXP"), serv_gets(buf), buf[0]=='1') { @@ -157,7 +157,7 @@ void page_popup(void) extract(pagefrom, &buf[4], 3); wprintf("
"); - wprintf("Express message from "); + wprintf("Instant message from "); escputs(pagefrom); wprintf("
\n"); diff --git a/webcit/webcit.c b/webcit/webcit.c index 912301d69..5d1473593 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -288,6 +288,7 @@ void output_headers(int controlcode) int suppress_check = 0; int cache = 0; char httpnow[SIZ]; + char onload_fcn[SIZ]; static int pageseq = 0; print_standard_html_head = controlcode & 0x03; refresh30 = ((controlcode & 0x04) >> 2); @@ -329,6 +330,17 @@ void output_headers(int controlcode) else svprintf("REFRESHTAG", WCS_STRING, "\n"); /* script for checking for pages (not always launched) */ + + sprintf(onload_fcn, "function onload_fcn() { \n"); + if (!WC->outside_frameset_allowed) { + strcat(onload_fcn, " force_frameset(); \n"); + } + if (!suppress_check) if (WC->HaveExpressMessages) { + strcat(onload_fcn, " launch_page_popup(); \n"); + WC->HaveExpressMessages = 0; + } + strcat(onload_fcn, "} \n"); + svprintf("PAGERSCRIPT", WCS_STRING, "\n", - ++pageseq + ++pageseq, + onload_fcn ); /* end script */ - if (!WC->outside_frameset_allowed) { - /* FIXME put this here */ - } do_template("head"); clear_local_substs(); - if (!suppress_check) if (WC->HaveExpressMessages) { - svprintf("extrabodyparms", WCS_STRING, "%s", - "onload=\"launch_page_popup()\" "); - WC->HaveExpressMessages = 0; - } + svprintf("extrabodyparms", WCS_STRING, "%s", + "onload='onload_fcn();' "); do_template("background"); clear_local_substs();