From 197203727417a03d87053a47e5aa5175a76e3e0b Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 17 Oct 2013 04:24:53 -0400
Subject: [PATCH] Fix vulnerability in handling _session argument of utils/save-prefs (#1489382)

---
 index.php |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/index.php b/index.php
index d874062..e96057c 100644
--- a/index.php
+++ b/index.php
@@ -2,7 +2,7 @@
 /*
  +-------------------------------------------------------------------------+
  | Roundcube Webmail IMAP Client                                           |
- | Version 0.7.2                                                           |
+ | Version 0.7.4                                                           |
  |                                                                         |
  | Copyright (C) 2005-2012, The Roundcube Dev Team                         |
  |                                                                         |
@@ -119,6 +119,10 @@
       // prevent endless looping on login page
       if ($query['_task'] == 'login')
         unset($query['_task']);
+
+      // prevent redirect to compose with specified ID (#1488226)
+      if ($query['_action'] == 'compose' && !empty($query['_id']))
+        $query = array();
     }
 
     // allow plugins to control the redirect url after login success

--
Gitblit v1.9.1