Menu

#72 Problem with subject folding in 1.4.0rc1.

closed-fixed
None
7
2003-01-23
2003-01-05
No

Found by Masato Higashiyama
Reported by Scott A. Hughes

There is a problem with subject folding that affects
Japanese in 1.4.0rc1. This problem is likely to affect
some other languages also.

The following is an illustration of the problem.

With a subject of:

Subject:
test=?ISO-2022-JP?B?GyRCJEYkOSRIGyhC?=test=?ISO-2022-JP?B?GyRCJUYlOSVIGyhC?=

The subject is sent as below:

Subject: test=?ISO-2022-JP?B?GyRCJEYkOSRIGyhC?=test=
?ISO-2022-JP?B?GyRCJUYlOSVIGyhC?=

The encoded character string is folded mid-way, hence
preventing successful decoding.

In order for correct decoding, the subject must be as
follows.

Subject: test=?ISO-2022-JP?B?GyRCJEYkOSRIGyhC?=test
=?ISO-2022-JP?B?GyRCJUYlOSVIGyhC?=

-- End --

Discussion

  • Thijs Kinkhorst

    Thijs Kinkhorst - 2003-01-06
    • labels: 102906 -->
     
  • Thijs Kinkhorst

    Thijs Kinkhorst - 2003-01-06
    • assigned_to: nobody --> kink
     
  • Thijs Kinkhorst

    Thijs Kinkhorst - 2003-01-07
    • assigned_to: kink --> nobody
     
  • Marc Groot Koerkamp

    Logged In: YES
    user_id=476981

    When does this problem occur?

    Is it with sending messages or when you read a message?

     
  • Scott A. Hughes

    Scott A. Hughes - 2003-01-08

    Logged In: YES
    user_id=79178

    The problem occurs when sending messages.

     
  • Marc Groot Koerkamp

    Logged In: YES
    user_id=476981

    Folding is happening correct, when a mailclient wants to
    decode the subject it has de unfold the header before it starts
    decoding and that's probably the problem. I can manipulate
    the folding routine in the deliver class but I have to be sure
    that other mailclients can't decode the subject due to the
    folding method we use or that SquirrelMail is the only client
    that decodes the subject incorrect (which means not unfold
    first).
    Can you confirm that other mailclients then SquirrelMail
    cannot decode the subject due to the way we fold it?

     
  • Marc Groot Koerkamp

    • priority: 5 --> 7
    • assigned_to: nobody --> stekkel
     
  • Marc Groot Koerkamp

    Logged In: YES
    user_id=476981

    Excuse me, folding is happening incorrect, according
    RFC2047:
    2. Syntax of encoded-words

    An 'encoded-word' is defined by the following ABNF
    grammar. The notation of RFC 822 is used, with the
    exception that white space characters MUST NOT appear
    between components of an 'encoded-word'.

    encoded-word = "=?" charset "?" encoding "?" encoded-
    text "?="

    Probably I have to add a regular expression that looks for
    =? ... ?= sequences and prohibit that we fold inside such
    sequence.

     
  • Scott A. Hughes

    Scott A. Hughes - 2003-01-20

    Logged In: YES
    user_id=79178

    Masato recently sent a group of patches to Philippe, and
    this issue is dealt with there. Thank you for following this
    up and hopefully the patches sent will help identify this issue.

     
  • Marc Groot Koerkamp

    • status: open --> closed
     
  • Marc Groot Koerkamp

    • status: closed --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.