X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=index.php;h=ff9bc8ec0c1aa254ca567eac31ed954ba7f45acf;hb=c3aa3dd9cecd35ff50c4a61bff53b1aa893bc7ff;hp=883faa6d659cf321c490d5b3e18d0f2f50d79b25;hpb=b3b93477f293bb1a37e17e2152f1710a2a1ab93c;p=roundcube.git diff --git a/index.php b/index.php index 883faa6..ff9bc8e 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ /* +-------------------------------------------------------------------------+ | Roundcube Webmail IMAP Client | - | Version 0.5.1 | + | Version 0.5.2 | | | | Copyright (C) 2005-2011, Roundcube Dev. - Switzerland | | | @@ -23,7 +23,7 @@ | Author: Thomas Bruederli | +-------------------------------------------------------------------------+ - $Id: index.php 4509 2011-02-09 10:51:50Z thomasb $ + $Id: index.php 4674 2011-04-20 09:03:08Z thomasb $ */ @@ -95,10 +95,12 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { } else if ($auth['valid'] && !$auth['abort'] && !empty($auth['host']) && !empty($auth['user']) && - $RCMAIL->login($auth['user'], $auth['pass'], $auth['host'])) { - // create new session ID + $RCMAIL->login($auth['user'], $auth['pass'], $auth['host']) + ) { + // create new session ID, don't destroy the current session + // it was destroyed already by $RCMAIL->kill_session() above $RCMAIL->session->remove('temp'); - $RCMAIL->session->regenerate_id(); + $RCMAIL->session->regenerate_id(false); // send auth cookie if necessary $RCMAIL->authenticate_session(); @@ -110,7 +112,7 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { $query = array(); if ($url = get_input_value('_url', RCUBE_INPUT_POST)) { parse_str($url, $query); - + // prevent endless looping on login page if ($query['_task'] == 'login') unset($query['_task']); @@ -180,7 +182,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()) { + if (rc_request_header('X-Roundcube-Request') != $RCMAIL->get_request_token() && !$RCMAIL->config->get('devel_mode')) { header('HTTP/1.1 404 Not Found'); die("Invalid Request"); }