projects
/
project/drupal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
ffc9c6f
)
- sa-2006-004: E-mail header injection issue
author
Steven Wittens
Mon, 13 Mar 2006 21:30:09 +0000 (21:30 +0000)
committer
Steven Wittens
Mon, 13 Mar 2006 21:30:09 +0000 (21:30 +0000)
includes/common.inc
patch
|
blob
|
blame
|
history
diff --git
a/includes/common.inc
b/includes/common.inc
index
b67350b
..
e8c9960
100644
(file)
--- a/
includes/common.inc
+++ b/
includes/common.inc
@@
-1766,7
+1766,7
@@
function truncate_utf8($string, $len) {
* have to be changed to \r\n or \r.
*/
function mime_header_encode($string, $charset = 'UTF-8') {
- if (!preg_match('/^[\x20-\x7E]*$/', $string)) {
+ if (preg_match('/[^\x20-\x7E]/', $string)) {
$chunk_size = 75 - 7 - strlen($charset);
$chunk_size -= $chunk_size % 4;
$string = trim(chunk_split(base64_encode($string), $chunk_size, "\n"));