Skip to content
Snippets Groups Projects
Commit 545ebaa4 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

do not use char class in Mailer header cleaning

\w could match multibyte chars depending on system setup
parent 65ee48a5
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment