VM

[PATCH] vm-mime.el:vm-mime-encode-words creates garbled X-VM-v5-Data

Bug #323979 reported by Marcin Koziej
2
Affects Status Importance Assigned to Milestone
VM
Won't Fix
Undecided
Unassigned
8.0.x
Won't Fix
Undecided
Unassigned
Trunk
Won't Fix
Undecided
Unassigned

Bug Description

VM 8.0.12
X-VM-v5-Data is encoded by vm-mime.el:vm-mime-encode-words,
unfortunately, it is not aware of quote marks, so when it encounters
a string:
"\"Wechikuł czasu"\" it encodes it as follows:
"=?utf-8?Q?\"Wehiku=C5=82 czasu\"?="
As You can notice, quote marks are inside, making this string impossible to
evaluate later.

My proposed fix is to change vm-vars.el:vm-mime-encode-headers-words-regexp so it doesn't span over " marks.
(see patch)
After this change, string is encoded as follows:

"\"=?utf-8?Q?Wehiku=C5=82?= czasu\""

Revision history for this message
Marcin Koziej (marcin-antoni-koziej) wrote :
Uday Reddy (reddyuday)
Changed in viewmail:
status: New → Fix Released
Uday Reddy (reddyuday)
Changed in viewmail:
status: Fix Released → Fix Committed
Revision history for this message
Uday Reddy (reddyuday) wrote :

Ulrich, I have tried this patch, but I don't think it is doing what was claimed. Can you double check? -- Uday

Changed in viewmail:
status: Fix Committed → In Progress
Revision history for this message
Ulrich Müller (ulm) wrote :

RFC 2047 says in section 5:
+ An 'encoded-word' MUST NOT appear within a 'quoted-string'.
So I think this patch is wrong.

If I read that RFC correctly, the right encoding for the string
"\"Wehikuł czasu"\" is:
"=?utf-8?Q?=22Wehiku=C5=82_czasu=22?="

Looks like there's more to the problem than simply changing a regexp.
Probably we should use some functions from rfc822.el for proper
parsing (I've checked, this file existed in Emacs 18, so it should be
available everywhere).

Uday Reddy (reddyuday)
tags: added: intenational
Revision history for this message
Uday Reddy (reddyuday) wrote :

Actually, I put quotes around your (Ulrich's) name in utf-8 in one of the messages, saved it and loaded it back into VM. The VM-v5-Data header had the quote marks inside the utf-8 bits, and VM seems to have handled it without any problem. So, the problem reported here was probably a consequence of the other VM-v5-Data problems which are now fixed. So, I think we can ignore this bug report unless Marcin comes back with some new information. I am changing the status to "incomplete".

Changed in viewmail:
status: In Progress → Incomplete
Uday Reddy (reddyuday)
tags: added: international
removed: intenational
Uday Reddy (reddyuday)
Changed in viewmail:
status: Incomplete → Won't Fix
Uday Reddy (reddyuday)
Changed in vm:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.