From bbb1427caabba60e4329d4b3653fbf29d5ddddcc Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 19 Apr 2011 16:41:24 -0400
Subject: [PATCH] Gracefully shrug on database errors
---
program/include/rcmail.php | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 0fc7446..17b8219 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1107,7 +1107,9 @@
public function get_request_token()
{
$sess_id = $_COOKIE[ini_get('session.name')];
- return md5('RT' . $this->task . $this->config->get('des_key') . $sess_id);
+ 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)));
+ return $plugin['value'];
}
--
Gitblit v1.9.1