diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-07-01 11:46:16 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-07-01 11:46:16 +0200 |
commit | 545ebaa42520487f1cd412e7113b0b8404f55a85 (patch) | |
tree | 74e8f2d05f6ea84bbf80f05285f8e96539183b0a /inc | |
parent | 65ee48a57f42826189844ad1039c37a8a675dbab (diff) | |
download | rpg-545ebaa42520487f1cd412e7113b0b8404f55a85.tar.gz rpg-545ebaa42520487f1cd412e7113b0b8404f55a85.tar.bz2 |
do not use char class in Mailer header cleaning
\w could match multibyte chars depending on system setup
Diffstat (limited to 'inc')
-rw-r--r-- | inc/Mailer.class.php | 4 |
1 files 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 |