summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-09-16 17:53:35 +0000
committerthomascube <thomas@roundcube.net>2011-09-16 17:53:35 +0000
commit06dc9838e0327c9472cbd3f353b40317eba0ecef (patch)
tree5453f347243a0fdc72fe0e201af3faa7890d0be9 /program/include
parent612eeca739c00e6e0341c2f039b23cefff8d4945 (diff)
Fix session race conditions when composing new messages
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_json_output.php1
-rw-r--r--program/include/rcube_session.php6
2 files changed, 4 insertions, 3 deletions
diff --git a/program/include/rcube_json_output.php b/program/include/rcube_json_output.php
index ade9cc033..e0a29c1b1 100644
--- a/program/include/rcube_json_output.php
+++ b/program/include/rcube_json_output.php
@@ -219,6 +219,7 @@ class rcube_json_output
*/
public function send()
{
+ sleep(6);
$this->remote_response();
exit;
}
diff --git a/program/include/rcube_session.php b/program/include/rcube_session.php
index c1d9b9c6c..27cf69464 100644
--- a/program/include/rcube_session.php
+++ b/program/include/rcube_session.php
@@ -321,9 +321,9 @@ class rcube_session
*/
public function cleanup()
{
- // current compose information is stored in $_SESSION['compose'], move it to $_SESSION['compose_data']
- if ($_SESSION['compose']) {
- $_SESSION['compose_data'][$_SESSION['compose']['id']] = $_SESSION['compose'];
+ // current compose information is stored in $_SESSION['compose'], move it to $_SESSION['compose_data_<ID>']
+ if ($compose_id = $_SESSION['compose']['id']) {
+ $_SESSION['compose_data_'.$compose_id] = $_SESSION['compose'];
$this->remove('compose');
}
}