summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_config.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-04 07:59:48 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-04 07:59:48 +0000
commita0c3fba23243ddcb976d29a7961b6c4e313424ca (patch)
tree0f4189f1a28770e859affb0d4e416b4824b58a5a /roundcubemail/program/include/rcube_config.php
parenta23550df2c9df46cb4b292d764225f2df9e960eb (diff)
- Added mail_header_delimiter validation
git-svn-id: https://svn.roundcube.net/trunk@3937 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_config.php')
-rw-r--r--roundcubemail/program/include/rcube_config.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_config.php b/roundcubemail/program/include/rcube_config.php
index eb2e088c4..488ffc420 100644
--- a/roundcubemail/program/include/rcube_config.php
+++ b/roundcubemail/program/include/rcube_config.php
@@ -247,8 +247,17 @@ class rcube_config
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));