Merge pull request #210 from Fraenkiman/upstream/issue209

for non-ASCII characters in the e-mail header
This commit is contained in:
Arvid Zimmermann 2023-03-05 13:27:56 +01:00 committed by GitHub
commit 40b8f414b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 12 additions and 11 deletions

View File

@ -222,7 +222,8 @@ function commentform() {
$fp_config ['general'] ['title']
), $lang ['comments'] ['mail']);
@utils_mail($from_mail, "{$lang ['comments'] ['newcomment']} {$lang ['comments'] ['newcomment']} {$fp_config['general']['title']}", $mail);
// for non-ASCII characters in the e-mail header use RFC 1342 — Encodes data with MIME base64 and splits the encrypted subject
@utils_mail($from_mail, '=?utf-8?B?' . base64_encode($lang ['comments'] ['newcomment']) . '=?= =?utf-8?B?' . base64_encode($fp_config ['general'] ['title']) . '==?=', $mail);
}
// if comment is valid, this redirect will clean the postdata