From 545ebaa42520487f1cd412e7113b0b8404f55a85 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Sun, 1 Jul 2012 11:46:16 +0200
Subject: [PATCH] do not use char class in Mailer header cleaning

\w could match multibyte chars depending on system setup
---
 inc/Mailer.class.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php
index fccf1dad9..b0af967de 100644
--- a/inc/Mailer.class.php
+++ b/inc/Mailer.class.php
@@ -132,8 +132,8 @@ class Mailer {
     public function setHeader($header, $value, $clean = true) {
         $header = str_replace(' ', '-', ucwords(strtolower(str_replace('-', ' ', $header)))); // streamline casing
         if($clean) {
-            $header = preg_replace('/[^\w \-\.\+\@]+/', '', $header);
-            $value  = preg_replace('/[^\w \-\.\+\@<>]+/', '', $value);
+            $header = preg_replace('/[^a-zA-Z0-9 \-\.\+\@]+/', '', $header);
+            $value  = preg_replace('/[^a-zA-Z0-9 \-\.\+\@<>]+/', '', $value);
         }
 
         // empty value deletes
-- 
GitLab