summaryrefslogtreecommitdiff
path: root/modules/extra/webcpanel/webcpanel.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-12-15 23:51:25 -0500
committerAdam <Adam@anope.org>2012-12-15 23:51:25 -0500
commitc49f03f985a4f142d4b050cbe57fc548e88207e4 (patch)
tree12828c3c9e3850eece46a614bd0b72e3cc0f465d /modules/extra/webcpanel/webcpanel.h
parent8e3ab0d10b8f1d7683d4301b66e6c0609995cff1 (diff)
Allow escaping brackets in webpanel templates and redirect users to the homepage when their session is not found
Diffstat (limited to 'modules/extra/webcpanel/webcpanel.h')
-rw-r--r--modules/extra/webcpanel/webcpanel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/extra/webcpanel/webcpanel.h b/modules/extra/webcpanel/webcpanel.h
index 051bab790..511ecf354 100644
--- a/modules/extra/webcpanel/webcpanel.h
+++ b/modules/extra/webcpanel/webcpanel.h
@@ -88,6 +88,8 @@ class WebPanelProtectedPage : public WebPanelPage
if (!panel || !(na = panel->GetNickFromSession(client, message)))
{
+ reply.error = HTTP_FOUND;
+ reply.headers["Location"] = Anope::string("http") + (use_ssl ? "s" : "") + "://" + message.headers["Host"] + "/";
return true; // Access denied
}