Projects
Kolab:3.4
kolab-syncroton
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 46
View file
kolab-syncroton.spec
Changed
@@ -26,7 +26,7 @@ Name: kolab-syncroton Version: 2.2.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: ActiveSync for Kolab Groupware Group: Applications/Internet @@ -39,6 +39,7 @@ Patch1: kolab-syncroton-2.2.4-fix-from-header-displayname.patch Patch2: kolab-syncroton-2.2.4-dont-omit-junk-folder.patch +Patch3: kolab-syncroton-2.2.4-fix-recode-message-boundary-handling.patch BuildArch: noarch @@ -75,6 +76,7 @@ %patch1 -p1 %patch2 -p1 +%patch3 -p1 rm -rf \ lib/ext/Auth/ \ @@ -203,7 +205,8 @@ %attr(0770,%{httpd_user},%{httpd_group}) %{_var}/log/%{name} %changelog -* Thu Feb 6 2014 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 2.2.4-3 +* Thu Feb 6 2014 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 2.2.4-4 +- Fix recode_message() boundary handling - Refresh Junk folder patch * Wed Jan 29 2014 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 2.2.4-2
View file
kolab-syncroton-2.2.4-fix-recode-message-boundary-handling.patch
Added
@@ -0,0 +1,173 @@ +commit 80ebec3f4600f99d1ac693cc15b03f20d8d4a75a +Author: Aleksander Machniak <alec@alec.pl> +Date: Thu Feb 6 15:55:57 2014 +0100 + + Fix issues in recode_message() - wrong boundaries handling + +diff --git a/lib/kolab_sync_message.php b/lib/kolab_sync_message.php +index 79ac8d9..026d557 100644 +--- a/lib/kolab_sync_message.php ++++ b/lib/kolab_sync_message.php +@@ -297,15 +297,15 @@ class kolab_sync_message + $hdrs = self::parse_headers($headers); + + // multipart message +- if (preg_match('/boundary="?([a-z0-9-_]+)"?/i', $hdrs['Content-Type'], $matches)) { ++ if (preg_match('/boundary="?([a-z0-9-\'\(\)+_\,\.\/:=\? ]+)"?/i', $hdrs['Content-Type'], $matches)) { + $boundary = '--' . $matches[1]; + $message = explode($boundary, $message); + + for ($x=1, $parts = count($message) - 1; $x<$parts; $x++) { +- $message[$x] = "\r\n" . self::recode_message($message[$x]); ++ $message[$x] = "\r\n" . self::recode_message(ltrim($message[$x])); + } + +- return $headers . "\r\n\r\n" . implode($boundary, $message); ++ return $headers . "\r\n\r\n" . implode($boundary , $message); + } + + // single part +diff --git a/tests/message.php b/tests/message.php +index 19e1901..a49c5d1 100644 +--- a/tests/message.php ++++ b/tests/message.php +@@ -135,4 +135,17 @@ class message extends PHPUnit_Framework_TestCase + + $this->assertEquals($result, $message); + } ++ ++ /** ++ * Test recoding the message ++ */ ++ function test_recode_message_4() ++ { ++ $source = file_get_contents(TESTS_DIR . '/src/mail.recode4'); ++ $result = file_get_contents(TESTS_DIR . '/src/mail.recode4.out'); ++ ++ $message = kolab_sync_message::recode_message($source); ++ ++ $this->assertEquals($result, $message); ++ } + } +diff --git a/tests/src/mail.recode2.out b/tests/src/mail.recode2.out +index ff4c323..be03aae 100644 +--- a/tests/src/mail.recode2.out ++++ b/tests/src/mail.recode2.out +@@ -9,7 +9,6 @@ Content-Type: multipart/mixed; + + This is a multi-part message in MIME format. + --------------000801030509090203070207 +- + Content-Type: multipart/alternative; + boundary="------------060305070900000101080707" + +@@ -31,7 +30,6 @@ ZSBBZHZlbnRzZ3L832U8YnI+DQogIDwvYm9keT4NCjwvaHRtbD4= + --------------060305070900000101080707-- + + --------------000801030509090203070207 +- + Content-Type: application/pdf; + name="Weihnachtsbrief13.pdf" + Content-Transfer-Encoding: base64 +diff --git a/tests/src/mail.recode4 b/tests/src/mail.recode4 +new file mode 100644 +index 0000000..624766e +--- /dev/null ++++ b/tests/src/mail.recode4 +@@ -0,0 +1,47 @@ ++MIME-Version: 1.0 ++Content-Type: multipart/alternative; ++ boundary="=_421c567043d5df058671910ddb659fc5" ++Date: Thu, 06 Feb 2014 13:59:33 +0000 ++From: alec <test@test.cc> ++To: <test2@test.cc> ++Subject: test html + image ++Message-ID: <6c821c802bc5293e179f9bcb5d4d8279@klab.cc> ++User-Agent: Roundcube Webmail/1.0-git ++ ++--=_421c567043d5df058671910ddb659fc5 ++Content-Transfer-Encoding: 8bit ++Content-Type: text/plain; charset=UTF-8 ++ ++ ++ ++test message with inline image żąść ++ ++ ++--=_421c567043d5df058671910ddb659fc5 ++Content-Type: multipart/related; ++ boundary="=_61b68141aaee8dc5b321e6059b43bb78" ++ ++--=_61b68141aaee8dc5b321e6059b43bb78 ++Content-Transfer-Encoding: quoted-printable ++Content-Type: text/html; charset=UTF-8 ++ ++<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> ++<html><body style=3D'font-size: 10pt; font-family: Verdana,Geneva,sans-seri= ++f'> ++<p>test message with inline image =C5=BC=C4=85=C5=9B=C4=87</p> ++<p><img src=3D"cid:139169517352f395455c016176663627@test.cc" alt=3D"logo.gif" /></p> ++</body></html> ++ ++--=_61b68141aaee8dc5b321e6059b43bb78 ++Content-Transfer-Encoding: base64 ++Content-ID: <139169517352f395455c016176663627@test.cc> ++Content-Type: image/jpeg; ++ name=logo.gif ++Content-Disposition: inline; ++ filename=logo.gif; ++ size=25745 ++ ++/9j/4AAQSkZJRgABAgEASABIAAD/4QqARXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUA ++--=_61b68141aaee8dc5b321e6059b43bb78-- ++ ++--=_421c567043d5df058671910ddb659fc5-- +diff --git a/tests/src/mail.recode4.out b/tests/src/mail.recode4.out +new file mode 100644 +index 0000000..e86db3f +--- /dev/null ++++ b/tests/src/mail.recode4.out +@@ -0,0 +1,43 @@ ++MIME-Version: 1.0 ++Content-Type: multipart/alternative; ++ boundary="=_421c567043d5df058671910ddb659fc5" ++Date: Thu, 06 Feb 2014 13:59:33 +0000 ++From: alec <test@test.cc> ++To: <test2@test.cc> ++Subject: test html + image ++Message-ID: <6c821c802bc5293e179f9bcb5d4d8279@klab.cc> ++User-Agent: Roundcube Webmail/1.0-git ++ ++--=_421c567043d5df058671910ddb659fc5 ++Content-Transfer-Encoding: base64 ++Content-Type: text/plain; charset=UTF-8 ++ ++IA0KDQp0ZXN0IG1lc3NhZ2Ugd2l0aCBpbmxpbmUgaW1hZ2UgxbzEhcWbxIc= ++--=_421c567043d5df058671910ddb659fc5 ++Content-Type: multipart/related; ++ boundary="=_61b68141aaee8dc5b321e6059b43bb78" ++ ++--=_61b68141aaee8dc5b321e6059b43bb78 ++Content-Transfer-Encoding: quoted-printable ++Content-Type: text/html; charset=UTF-8 ++ ++<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> ++<html><body style=3D'font-size: 10pt; font-family: Verdana,Geneva,sans-seri= ++f'> ++<p>test message with inline image =C5=BC=C4=85=C5=9B=C4=87</p> ++<p><img src=3D"cid:139169517352f395455c016176663627@test.cc" alt=3D"logo.gif" /></p> ++</body></html> ++ ++--=_61b68141aaee8dc5b321e6059b43bb78 ++Content-Transfer-Encoding: base64 ++Content-ID: <139169517352f395455c016176663627@test.cc> ++Content-Type: image/jpeg; ++ name=logo.gif ++Content-Disposition: inline; ++ filename=logo.gif; ++ size=25745 ++ ++/9j/4AAQSkZJRgABAgEASABIAAD/4QqARXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUA ++--=_61b68141aaee8dc5b321e6059b43bb78-- ++ ++--=_421c567043d5df058671910ddb659fc5--
View file
debian.changelog
Changed
@@ -1,5 +1,6 @@ -kolab-syncroton (2.2.4-0~kolab3) unstable; urgency=low +kolab-syncroton (2.2.4-0~kolab4) unstable; urgency=low + * Fix recode_message() boundary handling * Really fix Junk folders being omitted for synchronization -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Thu, 06 Feb 2014 15:13:40 +0200
View file
debian.series
Changed
@@ -1,2 +1,3 @@ kolab-syncroton-2.2.4-fix-from-header-displayname.patch -p1 kolab-syncroton-2.2.4-dont-omit-junk-folder.patch -p1 +kolab-syncroton-2.2.4-fix-recode-message-boundary-handling.patch -p1
View file
kolab-syncroton.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-syncroton Binary: kolab-syncroton Architecture: all -Version: 2.2.4-0~kolab3 +Version: 2.2.4-0~kolab4 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org/
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.