From 44a352b7b8ef4723030e6af2131ebadb4ba525cf Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sun, 30 Oct 2011 07:37:41 -0400
Subject: [PATCH] Backport r5375 to release branch
---
index.php | 2 +-
program/include/rcmail.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/index.php b/index.php
index de40cce..e8c6cef 100644
--- a/index.php
+++ b/index.php
@@ -195,7 +195,7 @@
// 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");
}
}
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index a4a783c..1ecdfcd 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1268,7 +1268,7 @@
{
$sess_id = $_COOKIE[ini_get('session.name')];
if (!$sess_id) $sess_id = session_id();
- $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->task . $this->config->get('des_key') . $sess_id)));
+ $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->user->ID . $this->config->get('des_key') . $sess_id)));
return $plugin['value'];
}
--
Gitblit v1.9.1