[libvmime07] Added a patch for '7-bit' fallback at invalid e-mail encodings

Robert Scheck robert at fedoraproject.org
Sun Oct 31 19:09:33 UTC 2010


commit 2122e5576a343a7885685d3b290d6fe32dc4f070
Author: Robert Scheck <robert at fedoraproject.org>
Date:   Sun Oct 31 20:09:31 2010 +0100

    Added a patch for '7-bit' fallback at invalid e-mail encodings

 libvmime07-0.7.1-allow-alternate-encodings.patch |   18 +++++++++++++++---
 libvmime07.spec                                  |    5 ++++-
 2 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/libvmime07-0.7.1-allow-alternate-encodings.patch b/libvmime07-0.7.1-allow-alternate-encodings.patch
index b3f391a..79ef4a3 100644
--- a/libvmime07-0.7.1-allow-alternate-encodings.patch
+++ b/libvmime07-0.7.1-allow-alternate-encodings.patch
@@ -1,8 +1,9 @@
 Patch by Zarafa <http://www.zarafa.com/> - which allows non-RFC '7-bit' and '8-bit' encodings in the
-Content-Transfer-Encoding headers.
+Content-Transfer-Encoding headers. The second part causes a fallback on "default" value "7bit", when it
+was invalid, making it the same case as when the header wasn't sent at all.
 
---- 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
+--- libvmime-0.7.1/src/encoderFactory.cpp				2010-10-31 19:57:12.533611083 +0100
++++ libvmime-0.7.1/src/encoderFactory.cpp.allow-alternate-encodings	2010-10-31 19:58:40.831276383 +0100
 @@ -40,7 +40,9 @@
  	registerName <encoderQP>("bmoted-printable");
  	registerName <encoderUUE>("uuencode");
@@ -13,3 +14,14 @@ Content-Transfer-Encoding headers.
  	registerName <encoderBinary>("binary");
  }
  
+@@ -79,7 +81,9 @@
+ 			return (*it);
+ 	}
+ 
+-	throw exceptions::no_encoder_available();
++	// fallback on "default" value 7bit when it was invalid, making it
++	// the same case as when the header wasn't sent at all
++	return getEncoderByName("7bit");
+ }
+ 
+ 
diff --git a/libvmime07.spec b/libvmime07.spec
index 73eeba8..735f2cb 100644
--- a/libvmime07.spec
+++ b/libvmime07.spec
@@ -1,7 +1,7 @@
 Summary:	A powerful C++ class library for working with MIME/Internet messages
 Name:		libvmime07
 Version:	0.7.1
-Release:	3%{?dist}
+Release:	4%{?dist}
 License:	GPLv2+
 Group:		System Environment/Libraries
 URL:		http://www.zarafa.com/wiki/index.php/Libvmime_patches
@@ -151,6 +151,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/vmime07.pc
 
 %changelog
+* Sun Oct 31 2010 Robert Scheck <robert at fedoraproject.org> 0.7.1-4
+- Added a patch for '7-bit' fallback at invalid e-mail encodings
+
 * 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


More information about the scm-commits mailing list