validate value in replaceCustomHeader
This commit is contained in:
parent
174653aa27
commit
beb87e3cf7
|
|
@ -4077,9 +4077,18 @@ class PHPMailer
|
|||
{
|
||||
foreach ($this->CustomHeader as $k => $pair) {
|
||||
if ($pair[0] == $name) {
|
||||
if (strpbrk($name . $value, "\r\n") !== false) {
|
||||
if ($this->exceptions) {
|
||||
throw new Exception($this->lang('invalid_header'));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
$this->CustomHeader[$k] = [$name, $value];
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue