X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=index.php;h=43a47f049b9b17868db9b2c4662629632486d8e4;hb=4c4508d948b6c3fc0bb4848e2bf07d1c905ddd5c;hp=e3e55d74b719c8ad3f92780b902d7a49b8364939;hpb=9621398b16a7cee8773b78d1fe9b53248c28a88b;p=roundcube.git diff --git a/index.php b/index.php index e3e55d7..43a47f0 100644 --- a/index.php +++ b/index.php @@ -2,9 +2,9 @@ /* +-------------------------------------------------------------------------+ | Roundcube Webmail IMAP Client | - | Version 0.6 | + | Version 0.7.2 | | | - | Copyright (C) 2005-2011, The Roundcube Dev Team | + | Copyright (C) 2005-2012, The Roundcube Dev Team | | | | This program is free software; you can redistribute it and/or modify | | it under the terms of the GNU General Public License version 2 | @@ -23,7 +23,7 @@ | Author: Thomas Bruederli | +-------------------------------------------------------------------------+ - $Id: index.php 5292 2011-09-28 19:16:41Z thomasb $ + $Id: index.php 5995 2012-03-11 16:22:50Z 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();