[Svn] r3937 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Sat Sep 4 09:59:48 CEST 2010


Author: alec
Date: 2010-09-04 02:59:48 -0500 (Sat, 04 Sep 2010)
New Revision: 3937

Modified:
   trunk/roundcubemail/program/include/rcube_config.php
Log:
- Added mail_header_delimiter validation


Modified: trunk/roundcubemail/program/include/rcube_config.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_config.php	2010-09-03 11:46:06 UTC (rev 3936)
+++ trunk/roundcubemail/program/include/rcube_config.php	2010-09-04 07:59:48 UTC (rev 3937)
@@ -247,8 +247,17 @@
     public function header_delimiter()
     {
         // use the configured delimiter for headers
-        if (!empty($this->prop['mail_header_delimiter']))
-            return $this->prop['mail_header_delimiter'];
+        if (!empty($this->prop['mail_header_delimiter'])) {
+            $delim = $this->prop['mail_header_delimiter'];
+            if ($delim == "\n" || $delim == "\r\n")
+                return $delim;
+            else
+                raise_error(array(
+                    'code' => 500, 'type' => 'php',
+	                'file' => __FILE__, 'line' => __LINE__,
+                    'message' => "Invalid mail_header_delimiter setting"
+                ), true, false);
+        }
 
         $php_os = strtolower(substr(PHP_OS, 0, 3));
 

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list