rpms/libvmime07/F-13 libvmime07-0.7.1-address-parse-encoded.patch, NONE, 1.1 libvmime07-0.7.1-allow-alternate-encodings.patch, NONE, 1.1 libvmime07-0.7.1-fullname-without-email-address.patch, NONE, 1.1 libvmime07-0.7.1-strip-spaces-parameterized-headers.patch, NONE, 1.1 libvmime07.spec, 1.3, 1.4

Robert Scheck robert at fedoraproject.org
Sun May 9 20:50:38 UTC 2010


Author: robert

Update of /cvs/pkgs/rpms/libvmime07/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv9973/F-13

Modified Files:
	libvmime07.spec 
Added Files:
	libvmime07-0.7.1-address-parse-encoded.patch 
	libvmime07-0.7.1-allow-alternate-encodings.patch 
	libvmime07-0.7.1-fullname-without-email-address.patch 
	libvmime07-0.7.1-strip-spaces-parameterized-headers.patch 
Log Message:
- Added a patch to fix the RFC 2047 encoded fullname parsing
- Added patch to support address headers with empty mail address
- Added a backported patch to strip excessive spaces in headers
- Added a patch to allow non-RFC '7-bit' and '8-bit' encodings


libvmime07-0.7.1-address-parse-encoded.patch:
 address.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE libvmime07-0.7.1-address-parse-encoded.patch ---
Patch by Zarafa <http://www.zarafa.com/> - fixes RFC 2047 (http://tools.ietf.org/html/rfc2047) encoded
fullname parsing. All addresses after a wrongly parsed address were not recognized anymore. 

--- libvmime-0.7.1/src/address.cpp					2005-03-18 22:26:46.000000000 +0100
+++ libvmime-0.7.1/src/address.cpp.address-parse-encoded		2010-05-09 22:20:53.000000000 +0200
@@ -103,7 +103,7 @@
 				break;
 			case '=':
 
-				if (pos + 1 < end && buffer[pos + 1] == '?')
+				if (!quotedRFC2047 && pos + 1 < end && buffer[pos + 1] == '?')
 				{
 					++pos;
 					quotedRFC2047 = true;

libvmime07-0.7.1-allow-alternate-encodings.patch:
 encoderFactory.cpp |    2 ++
 1 file changed, 2 insertions(+)

--- NEW FILE libvmime07-0.7.1-allow-alternate-encodings.patch ---
Patch by Zarafa <http://www.zarafa.com/> - which allows non-RFC '7-bit' and '8-bit' encodings in the
Content-Transfer-Encoding headers.

--- libvmime-0.7.1/src/encoderFactory.cpp				2010-05-09 22:32:19.000000000 +0200
+++ libvmime-0.7.1/src/encoderFactory.cpp.allow-alternate-encodings	2010-05-09 22:32:47.000000000 +0200
@@ -40,7 +40,9 @@
 	registerName <encoderQP>("bmoted-printable");
 	registerName <encoderUUE>("uuencode");
 	registerName <encoder7bit>("7bit");
+	registerName <encoder7bit>("7-bit");
 	registerName <encoder8bit>("8bit");
+	registerName <encoder8bit>("8-bit");
 	registerName <encoderBinary>("binary");
 }
 

libvmime07-0.7.1-fullname-without-email-address.patch:
 mailbox.cpp |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- NEW FILE libvmime07-0.7.1-fullname-without-email-address.patch ---
Patch by Zarafa <http://www.zarafa.com/> - adds support for address headers that specify an (encoded)
fullname with an empty email address, which was set by a <> marker.

--- libvmime-0.7.1/src/mailbox.cpp					2005-03-18 22:26:47.000000000 +0100
+++ libvmime-0.7.1/src/mailbox.cpp.fullname-without-email-address	2010-05-09 22:25:18.000000000 +0200
@@ -84,6 +84,7 @@
 	// Temporary buffers for extracted name and address
 	string name;
 	string address;
+	bool hadBrackets = false;
 
 	while (p < pend)
 	{
@@ -276,6 +277,7 @@
 				}
 				else if (*p == '>')
 				{
+					hadBrackets = true;
 					break;
 				}
 				else if (!parserHelpers::isSpace(*p))
@@ -302,7 +304,7 @@
 
 	// Swap name and address when no address was found
 	// (email address is mandatory, whereas name is optional).
-	if (address.empty() && !name.empty())
+	if (address.empty() && !name.empty() && !hadBrackets)
 	{
 		m_email.empty();
 		m_email.reserve(name.size());

libvmime07-0.7.1-strip-spaces-parameterized-headers.patch:
 parameterizedHeaderField.cpp |   25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

--- NEW FILE libvmime07-0.7.1-strip-spaces-parameterized-headers.patch ---
Patch by Zarafa <http://www.zarafa.com/> - which strips excessive spaces in parameterized headers. This
was backported from upstream subversion.

--- libvmime-0.7.1/src/parameterizedHeaderField.cpp			2005-06-03 13:09:11.000000000 +0200
+++ libvmime-0.7.1/src/parameterizedHeaderField.cpp.strip-spaces	2010-05-09 22:29:51.000000000 +0200
@@ -82,12 +82,31 @@
 	const string::value_type* const pstart = buffer.data() + position;
 	const string::value_type* p = pstart;
 
-	const string::size_type start = position;
+	string::size_type valueStart = position;
 
-	while (p < pend && *p != ';') ++p;
+	while (p < pend && parserHelpers::isSpace(*p))
+	{
+		++p;
+		++valueStart;
+	}
+
+	// Advance up to ';', if any
+	string::size_type valueLength = 0;
+
+	while (p < pend && *p != ';')  // FIXME: support ";" inside quoted or RFC-2047-encoded text
+	{
+		++p;
+		++valueLength;
+	}
+
+	// Trim whitespaces at the end of the value
+	while (valueLength > 0 && parserHelpers::isSpace(buffer[valueStart + valueLength - 1]))
+		--valueLength;
 
-	getValue().parse(buffer, start, position + (p - pstart));
+	// Parse value
+	getValue().parse(buffer, valueStart, valueStart + valueLength);
 
+	// Reset parameters
 	removeAllParameters();
 
 	// If there is one or more parameters following...


Index: libvmime07.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvmime07/F-13/libvmime07.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- libvmime07.spec	15 Feb 2010 20:54:39 -0000	1.3
+++ libvmime07.spec	9 May 2010 20:50:38 -0000	1.4
@@ -1,7 +1,7 @@
 Summary:	A powerful C++ class library for working with MIME/Internet messages
 Name:		libvmime07
 Version:	0.7.1
-Release:	2%{?dist}
+Release:	3%{?dist}
 License:	GPLv2+
 Group:		System Environment/Libraries
 URL:		http://www.zarafa.com/wiki/index.php/Libvmime_patches
@@ -36,6 +36,10 @@ Patch26:	libvmime07-0.7.1-threading-remo
 Patch27:	libvmime07-0.7.1-gcc-4.4-support.patch
 Patch28:	libvmime07-0.7.1-plain-bodycopy.patch
 Patch29:	libvmime07-0.7.1-sigset-signal.patch
+Patch30:	libvmime07-0.7.1-address-parse-encoded.patch
+Patch31:	libvmime07-0.7.1-fullname-without-email-address.patch
+Patch32:	libvmime07-0.7.1-strip-spaces-parameterized-headers.patch
+Patch33:	libvmime07-0.7.1-allow-alternate-encodings.patch
 BuildRequires:	sendmail, libtool, autoconf, automake
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -99,6 +103,10 @@ to work with the newer version and the n
 %patch27 -p1 -b .gcc-4.4-support
 %patch28 -p1 -b .plain-bodycopy
 %patch29 -p1 -b .sigset-signal
+%patch30 -p1 -b .address-parse-encoded
+%patch31 -p1 -b .fullname-without-email-address
+%patch32 -p1 -b .strip-spaces-parameterized-headers
+%patch33 -p1 -b .allow-alternate-encodings
 
 # Needed to apply branding patch
 libtoolize --force
@@ -143,6 +151,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/vmime07.pc
 
 %changelog
+* Sun May 09 2010 Robert Scheck <robert at fedoraproject.org> 0.7.1-3
+- Added a patch to fix the RFC 2047 encoded fullname parsing
+- Added patch to support address headers with empty mail address
+- Added a backported patch to strip excessive spaces in headers
+- Added a patch to allow non-RFC '7-bit' and '8-bit' encodings
+
 * Mon Feb 15 2010 Robert Scheck <robert at fedoraproject.org> 0.7.1-2
 - Added a patch with include for sigset_t definition (#565148)
 - Updated a patch to fix end of headers detection at last header



More information about the scm-commits mailing list