Skip to content
Snippets Groups Projects
Commit b6dba27a authored by Steven Wittens's avatar Steven Wittens
Browse files

- sa-2006-004: E-mail header injection issue

parent 16fd8c89
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -223,7 +223,7 @@ function truncate_utf8($string, $len, $wordsafe = FALSE, $dots = FALSE) { ...@@ -223,7 +223,7 @@ function truncate_utf8($string, $len, $wordsafe = FALSE, $dots = FALSE) {
* have to be changed to \r\n or \r. * have to be changed to \r\n or \r.
*/ */
function mime_header_encode($string) { function mime_header_encode($string) {
if (!preg_match('/^[\x20-\x7E]*$/', $string)) { if (preg_match('/[^\x20-\x7E]/', $string)) {
$chunk_size = 47; // floor((75 - strlen("=?UTF-8?B??=")) * 0.75); $chunk_size = 47; // floor((75 - strlen("=?UTF-8?B??=")) * 0.75);
$len = strlen($string); $len = strlen($string);
$output = ''; $output = '';
......
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