diff options
author | alecpl <alec@alec.pl> | 2010-09-04 07:59:48 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-09-04 07:59:48 +0000 |
commit | 086767c8f273e3bdd6c455876ccbcd876041b503 (patch) | |
tree | 66fb65e8924fec31a0239436ef281cd70b6e331f /program/include | |
parent | 7b7edcfa52071555ea8fcba2cc94bb01c88a0cc1 (diff) |
- Added mail_header_delimiter validation
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcube_config.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php index eb2e088c4..488ffc420 100644 --- a/program/include/rcube_config.php +++ b/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)); |