| | |
| | | /* |
| | | +-------------------------------------------------------------------------+ |
| | | | Roundcube Webmail IMAP Client | |
| | | | Version 0.7-svn | |
| | | | 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 | |
| | |
| | | // prevent endless looping on login page |
| | | if ($query['_task'] == 'login') |
| | | unset($query['_task']); |
| | | |
| | | // prevent redirect to compose with specified ID (#1488226) |
| | | if ($query['_action'] == 'compose' && !empty($query['_id'])) |
| | | $query = array(); |
| | | } |
| | | |
| | | // allow plugins to control the redirect url after login success |
| | |
| | | // 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"); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | // 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(); |