X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=index.php;h=1a7fcebf3fddabc8acbbcf4969ffadcd821eff87;hb=48e244a464574aa732ef5ab3fe759f1e05665b3d;hp=e3e55d74b719c8ad3f92780b902d7a49b8364939;hpb=a2dd2e41259a5e90016efcd7d083020b95e25527;p=roundcube.git diff --git a/index.php b/index.php index e3e55d7..1a7fceb 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ /* +-------------------------------------------------------------------------+ | Roundcube Webmail IMAP Client | - | Version 0.6 | + | Version 0.7 | | | | Copyright (C) 2005-2011, The Roundcube Dev Team | | | @@ -23,7 +23,7 @@ | Author: Thomas Bruederli | +-------------------------------------------------------------------------+ - $Id: index.php 5292 2011-09-28 19:16:41Z thomasb $ + $Id: index.php 5582 2011-12-09 08:55:40Z thomasb $ */ @@ -33,6 +33,9 @@ require_once 'program/include/iniset.php'; // init application, start session, init output class, etc. $RCMAIL = rcmail::get_instance(); +// Make the whole PHP output non-cacheable (#1487797) +send_nocacheing_headers(); + // turn on output buffering ob_start(); @@ -177,7 +180,7 @@ if (empty($RCMAIL->user->ID)) { ) ); } - + if ($session_error || $_REQUEST['_err'] == 'session') $OUTPUT->show_message('sessionerror', 'error', null, true, -1); @@ -192,7 +195,7 @@ else { // check client X-header to verify request origin if ($OUTPUT->ajax_call) { if (rc_request_header('X-Roundcube-Request') != $RCMAIL->get_request_token() && !$RCMAIL->config->get('devel_mode')) { - header('HTTP/1.1 404 Not Found'); + header('HTTP/1.1 403 Forbidden'); die("Invalid Request"); } } @@ -211,6 +214,12 @@ else { } } +// we're ready, user is authenticated and the request is safe +$plugin = $RCMAIL->plugins->exec_hook('ready', array('task' => $RCMAIL->task, 'action' => $RCMAIL->action)); +$RCMAIL->set_task($plugin['task']); +$RCMAIL->action = $plugin['action']; + + // handle special actions if ($RCMAIL->action == 'keep-alive') { $OUTPUT->reset();