From d0b973cf6aed4a7cb705f706624d25b31d19ed52 Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Thu, 18 Sep 2008 07:54:14 -0400
Subject: [PATCH] Bind cookie gotten over HTTPS to HTTPS only (#1485336).

---
 program/lib/Mail/mimePart.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/program/lib/Mail/mimePart.php b/program/lib/Mail/mimePart.php
index a9385d7..bd30477 100644
--- a/program/lib/Mail/mimePart.php
+++ b/program/lib/Mail/mimePart.php
@@ -397,7 +397,7 @@
         // RFC 2183/2184/2822: 
 	// value needs encoding if contains non-ASCII chars or is longer than 78 chars
 
-        if (preg_match('#[\x20-\x7E]#', $value)) { // ASCII
+        if (!preg_match('#[^\x20-\x7E]#', $value)) { // ASCII
 	    $quoted = addcslashes($value, '\\"');
 	    if (strlen($name) + strlen($quoted) + 6 <= $maxLength)
 		return " {$name}=\"{$quoted}\"; ";

--
Gitblit v1.9.1