Review request: Message reply fix for MfE



Hello all,
Please, review the attached patch and integrate it if it looks fine.
Here is some info:
1) Baseline code location:
URL: http://git.gitorious.org/tinymail/tinymail.git
Branch: tinymail-1-2
Commit: 5ad7626d4119f1d045941425b0873aa36190458c

2) Fixed bug: 158769 - Edited response not delivered for an Accepted meeting request;
Link: https://projects.maemo.org/bugzilla/show_bug.cgi?id=158769

3) Fix information:
The original bug was submitted for meeting requests, but the issue is reproducible for ordinary emails also.
Modest receives an email from recipient with email address like this:
From: "Nangunoori Naveen.K (EXT-Wipro/Helsinki)"\r\n <ext-naveen k nangunoori nokia com>
Here '\r\n' is the new line marker.
When the user presses 'reply all' Modest forms string for 'To:' like this: "Nangunoori Naveen.K (EXT-Wipro/Helsinki)"\r\n <ext-naveen k nangunoori nokia com> Modest passes this email address to 'tny_header_set_to (new_header, new_to)' -> '_foreach_email_add_to_inet_addr ()' -> '_string_to_camel_inet_addr ()';
In its turn, _string_to_camel_inet_addr () transforms:
["Nangunoori Naveen.K (EXT-Wipro/Helsinki)"\r\n] => [Nangunoori Naveen.K (EXT-Wipro/Helsinki)"] Here, the trailing \" is not removed. Now, the email address is considered to be: "Nangunoori Naveen.K (EXT-Wipro/Helsinki)\"" <ext-naveen k nangunoori nokia com> The email address has extra \" character. According to the RFCs the email address is still valid, but it is NOT valid for MS Exchange servers and it rejects such an address. I added stripping (removing whitespaces) the name before \" characters are removed. This fixes this particular issue.

Please, let me know if something is wrong with this fix.

Thank you,
Alexander


Alexander Chumakov
Architect

Teleca
24 Salganskaya St., Nizhny Novgorod, 603105, Russia
Phone: +78312788198, Fax: +78312577230
Alexander Chumakov teleca com
http://www.teleca.com/

Follow what's going on at Teleca's blog on http://www.whatsyourideaoftomorrow.blogspot.com/.

The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.

>From f459c05ca8095e9d9c6174c024ffa51e1511b565 Mon Sep 17 00:00:00 2001
From: alexander chumakov <alexander chumakov teleca com>
Date: Mon, 12 Apr 2010 17:52:34 +0400
Subject: [PATCH 2/2] Edited response not delivered for an Accepted meeting request

Fixed bug: https://projects.maemo.org/bugzilla/show_bug.cgi?id=158769
---
 libtinymail-camel/tny-camel-common.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libtinymail-camel/tny-camel-common.c b/libtinymail-camel/tny-camel-common.c
index b240ba4..8b90726 100644
--- a/libtinymail-camel/tny-camel-common.c
+++ b/libtinymail-camel/tny-camel-common.c
@@ -279,6 +279,7 @@ _string_to_camel_inet_addr (gchar *tok, CamelInternetAddress *target)
 	
 		if (G_LIKELY (lname && *lname == ' '))
 			*lname-- = '\0';
+		name = g_strstrip (name);
 		remove_quotes (name);
 		camel_internet_address_add (target, name, email);
 	} else {
-- 
1.7.0



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]