summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-08-24 09:39:30 +0000
committerthomascube <thomas@roundcube.net>2011-08-24 09:39:30 +0000
commit81fd8797d8aaedae4cd6842ed737de27beb0e684 (patch)
treeb57f16957109fb450e26b193d21747d4667eff9b
parent9f61af351807499a8a70ff7ca42ef983c5a1d992 (diff)
Backport from trunk
-rw-r--r--index.php2
-rw-r--r--program/include/main.inc4
2 files changed, 3 insertions, 3 deletions
diff --git a/index.php b/index.php
index c06eca11a..7229c909b 100644
--- a/index.php
+++ b/index.php
@@ -155,7 +155,7 @@ else if ($RCMAIL->task != 'login' && $_SESSION['user_id'] && $RCMAIL->action !=
// not logged in -> show login page
if (empty($RCMAIL->user->ID)) {
// log session failures
- if ($RCMAIL->task != 'login' && $RCMAIL->task != 'logout' && !$session_error && ($sess_id = $_COOKIE[ini_get('session.name')])) {
+ if (!in_array(get_input_value('_task', RCUBE_INPUT_GPC), array('login','logout')) && !$session_error && ($sess_id = $_COOKIE[ini_get('session.name')])) {
$RCMAIL->session->log("Aborted session " . $sess_id . "; no valid session data found");
$session_error = true;
}
diff --git a/program/include/main.inc b/program/include/main.inc
index 82d3eb7e9..0401fe2c1 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -2143,8 +2143,8 @@ function rcmail_log_login()
if (!$RCMAIL->config->get('log_logins') || !$RCMAIL->user)
return;
- write_log('userlogins', sprintf('Successful login for %s (ID: %d) from %s',
- $RCMAIL->user->get_username(), $RCMAIL->user->ID, rcmail_remote_ip()));
+ write_log('userlogins', sprintf('Successful login for %s (ID: %d) from %s in session %s',
+ $RCMAIL->user->get_username(), $RCMAIL->user->ID, rcmail_remote_ip(), session_id()));
}