From b6dba27ac22fd34d149d7a1acdfd652f32893743 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Mon, 13 Mar 2006 21:44:49 +0000 Subject: - sa-2006-004: E-mail header injection issue --- includes/unicode.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes/unicode.inc') diff --git a/includes/unicode.inc b/includes/unicode.inc index a2d1944c5..6714437b2 100644 --- a/includes/unicode.inc +++ b/includes/unicode.inc @@ -223,7 +223,7 @@ function truncate_utf8($string, $len, $wordsafe = FALSE, $dots = FALSE) { * have to be changed to \r\n or \r. */ 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); $len = strlen($string); $output = ''; -- cgit v1.2.3