6.0.0-beta1
7/8/25

[#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 12/03/2012 (4600 days ago)
Due
Updated 12/07/2012 (4596 days ago)
Assigned 12/04/2012 (4599 days ago)
Resolved 12/07/2012 (4596 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
12/07/2012 05:30:12 PM Michael Rubinsky State ⇒ Resolved
 
12/04/2012 05:48:46 PM 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
12/04/2012 04:03:07 PM 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 :)
12/04/2012 03:44:34 PM 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.
12/04/2012 03:30:25 PM Michael Rubinsky Comment #2
State ⇒ Assigned
Assigned to Michael Rubinsky
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.
12/03/2012 06:03:37 PM horde (at) albasoft (dot) com Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Activesync incorrect header encoding
Queue ⇒ Synchronization
Milestone ⇒
Patch ⇒ Yes
State ⇒ Unconfirmed
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