6.0.0-git
2019-03-18

[#11806] Activesync incorrect header encoding
Summary Activesync incorrect header encoding
Queue Synchronization
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners mrubinsk (at) horde (dot) org
Requester horde (at) albasoft (dot) com
Created 2012-12-03 (2296 days ago)
Due
Updated 2012-12-07 (2292 days ago)
Assigned 2012-12-04 (2295 days ago)
Resolved 2012-12-07 (2292 days ago)
Milestone
Patch Yes

History
2012-12-07 17:30:12 Michael Rubinsky State ⇒ Resolved
 
2012-12-04 17:48:46 Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit a682863da3d43e80ac600abe143e73764a795061
Author: horde@albasoft.com <horde@albasoft.com>
Date:   Tue Dec 4 12:45:25 2012 -0500

     Bug #11806  Must encode headers before sending to the mailer.
     Signed-off-by: Michael J Rubinsky <mrubinsk@horde.org>

  .../Core/lib/Horde/Core/ActiveSync/Driver.php      |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/a682863da3d43e80ac600abe143e73764a795061
2012-12-04 16:03:07 Michael Rubinsky Comment #4
State ⇒ Assigned
Reply to this comment
Unfortunately your patch isn't acceptable since it would break 
headers containing non-ascii characters that *are* correctly sent 
from the device or are, for whatever reason, not sent as utf-8 
encoded.
Nevermind, I was slightly confused :)
2012-12-04 15:44:34 Michael Rubinsky Comment #3
State ⇒ Feedback
Reply to this comment
Unfortunately your patch isn't acceptable since it would break headers 
containing non-ascii characters that *are* correctly sent from the 
device or are, for whatever reason, not sent as utf-8 encoded.
2012-12-04 15:30:25 Michael Rubinsky Comment #2
Assigned to Michael Rubinsky
State ⇒ Assigned
Reply to this comment
*sigh* The specs say the device is supposed to send a fully formed 
IMF/RFC5322 email string. I can confirm that, at least on several 
Android devices it is indeed sending UTF-8 characters in the headers.
2012-12-03 18:03:37 horde (at) albasoft (dot) com Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Activesync incorrect header encoding
Queue ⇒ Synchronization
Milestone ⇒
Patch ⇒ Yes
Reply to this comment
When I send a message from my device to a recipient containing 
iso-8859-1 chars, I get an email with no encoded message headers.
Sending to "José" <xx@xx.xx> (acute e) delivers a message with a 
header containing utf8 chars like:
   To: José <xx@xx.xx>
but it should be:
   To: =?utf-8?b?Sm9zw6k=?=  <xx@xx.xx>

I think there are some errors in Core/ActiveSync/Driver.php with 
charset handling. At line 1072:
    $h_array = $headers->toArray();
but changing it to
    $h_array = $headers->toArray(array('charset' => 'UTF-8'));
fixes the error and the message headers are correctly coded.
If this is correct, i guess this has to be fixed also in line 1183, in 
copy to sent folder:
$msg = $copy->toString(array('headers' => 
$headers->toString(array('charset' => 'UTF-8'))));

Saved Queries