Closed Bug 293869 Opened 20 years ago Closed 20 years ago

Question mark sign placed inside quoted printable header corrupts its decoding

Categories

(Thunderbird :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: andrzejk, Assigned: mscott)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050511 Firefox/1.0+
Build Identifier: Mozilla Thunderbird 1.0+ (Windows/20050510)

Following subject headers are not decoded properly, but displayed 'as is':

Subject: =?ISO-8859-2?Q?PC World Komputer z DVD za darmo??=
Subject: =?ISO-8859-2?Q?Kto=B6 pods=B3uchuje rozmowy?!?=
Subject: =?ISO-8859-2?Q?Czy wiesz, co to jest MMS??=
Subject: =?ISO-8859-2?Q?Dlaczego nie trzymasz pieni=EAdzy w mBanku??=

Probably it's because of plain '?' character inside encoded text. According to
following rule of quoted printable encoding it's incorrect bahaviour, because
'?' has decimal value of 63.

Rule #2: (Literal representation) Octets with decimal values of 33
through 60 inclusive, and 62 through 126, inclusive, MAY be
represented as the ASCII characters which correspond to those
octets (EXCLAMATION POINT through LESS THAN, and GREATER THAN
through TILDE, respectively).

Reproducible: Always

Steps to Reproduce:
1. try to read message with headers encoded as shown above
Actual Results:  
headers are shown 'as is'

Expected Results:  
headers sould be decoded first
Attached file sample message
testcase
jshin is our mime decoding expert...
You quoted the wrong RFC. In addition to RFC 2045, you should have referred to
RFC 2047 (http://www.faqs.org/rfc2047.html) . 'Q-encoding' used in the MIME
header fields is similar to 'quoted-printable' but is not the same. Obviously,
'?' cannot be used verbatim inside 'Q-encoding' because '?' plays a very
important role in the MIME header fields as the delimeter. 

The following was taken from RFC 2047 :

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 "?="

   charset = token    ; see section 3

   encoding = token   ; see section 4

   token = 1*<Any CHAR except SPACE, CTLs, and especials>

   especials = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "
               <"> / "/" / "[" / "]" / "?" / "." / "="


  encoded-text = 1*<Any printable ASCII character other than "?"
                     or SPACE>
                  ; (but see "Use of encoded-words in message
                  ; headers", section 5)
  
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
(In reply to comment #3)
> You quoted the wrong RFC. In addition to RFC 2045, you should have referred to
> RFC 2047 (http://www.faqs.org/rfc2047.html) . 'Q-encoding' used in the MIME
> header fields is similar to 'quoted-printable' but is not the same. Obviously,
> '?' cannot be used verbatim inside 'Q-encoding' because '?' plays a very
> important role in the MIME header fields as the delimeter. 

Yes, you're absolutely right - I overlooked this RFC. Now I have to evangelize
my free email provider, which sends ads with broken headers. Thank you for
explanation!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: