2011-01-03 [colin] 3.7.8cvs25
* src/unmime.c Fix bug #2299, "Incorrect handling of quoted printable coma in headers". As this is really painful to fix by switching the whole stuff to a list of headers tokens, we workaround the problem by adding quotes around the encoded-word (making it a quoted-string which continuity is already handled).
This commit is contained in:
parent
107f494f58
commit
013e94ff36
|
@ -1,3 +1,12 @@
|
|||
2011-01-03 [colin] 3.7.8cvs25
|
||||
|
||||
* src/unmime.c
|
||||
Fix bug #2299, "Incorrect handling of quoted printable coma
|
||||
in headers". As this is really painful to fix by switching
|
||||
the whole stuff to a list of headers tokens, we workaround
|
||||
the problem by adding quotes around the encoded-word (making
|
||||
it a quoted-string which continuity is already handled).
|
||||
|
||||
2011-01-03 [colin] 3.7.8cvs24
|
||||
|
||||
* src/procheader.c
|
||||
|
|
|
@ -4098,3 +4098,4 @@
|
|||
( cvs diff -u -r 1.50.2.60 -r 1.50.2.61 src/compose.h; ) > 3.7.8cvs22.patchset
|
||||
( cvs diff -u -r 1.382.2.564 -r 1.382.2.565 src/compose.c; ) > 3.7.8cvs23.patchset
|
||||
( cvs diff -u -r 1.47.2.51 -r 1.47.2.52 src/procheader.c; ) > 3.7.8cvs24.patchset
|
||||
( cvs diff -u -r 1.8.2.14 -r 1.8.2.15 src/unmime.c; ) > 3.7.8cvs25.patchset
|
||||
|
|
|
@ -12,7 +12,7 @@ MINOR_VERSION=7
|
|||
MICRO_VERSION=8
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=24
|
||||
EXTRA_VERSION=25
|
||||
EXTRA_RELEASE=
|
||||
EXTRA_GTK2_VERSION=
|
||||
|
||||
|
|
11
src/unmime.c
11
src/unmime.c
|
@ -114,6 +114,17 @@ gchar *unmime_header(const gchar *encoded_str)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* An encoded word MUST not appear within a quoted string,
|
||||
* so quoting that word after decoding should be safe.
|
||||
* We check there are no quotes just to be sure. If there
|
||||
* are, well, the comma won't pose a problem, probably.
|
||||
*/
|
||||
if (strchr(decoded_text, ',') && !strchr(decoded_text, '"')) {
|
||||
gchar *tmp = g_strdup_printf("\"%s\"", decoded_text);
|
||||
g_free(decoded_text);
|
||||
decoded_text = tmp;
|
||||
}
|
||||
|
||||
/* convert to UTF-8 */
|
||||
conv_str = conv_codeset_strdup(decoded_text, charset, NULL);
|
||||
if (!conv_str || !g_utf8_validate(conv_str, -1, NULL)) {
|
||||
|
|
Loading…
Reference in a new issue