From 037af6890fe6fdb84a08d3c86083e847c90ec0ad Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 22 Oct 2013 08:17:26 -0400
Subject: [PATCH] Fix vulnerability in handling _session argument of utils/save-prefs (#1489382)

---
 program/lib/Roundcube/rcube_smtp.php |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/program/lib/Roundcube/rcube_smtp.php b/program/lib/Roundcube/rcube_smtp.php
index 79ffcfb..201e826 100644
--- a/program/lib/Roundcube/rcube_smtp.php
+++ b/program/lib/Roundcube/rcube_smtp.php
@@ -119,7 +119,7 @@
         }
 
         // try to connect to server and exit on failure
-        $result = $this->conn->connect($smtp_timeout);
+        $result = $this->conn->connect($CONFIG['smtp_timeout']);
 
         if (PEAR::isError($result)) {
             $this->response[] = "Connection failed: ".$result->getMessage();
@@ -227,7 +227,8 @@
         }
 
         // RFC2298.3: remove envelope sender address
-        if (preg_match('/Content-Type: multipart\/report/', $text_headers)
+        if (empty($opts['mdn_use_from'])
+            && preg_match('/Content-Type: multipart\/report/', $text_headers)
             && preg_match('/report-type=disposition-notification/', $text_headers)
         ) {
             $from = '';

--
Gitblit v1.9.1