[Bug 3168] New: ${rfc2047:} expansion is generating encoded-words longer than permitted in RFC 2047

Exim Bugzilla via Exim-dev <[email protected]>
Newsgroups gmane.mail.exim.devel
Message-ID <[email protected]/>
https://bugs.exim.org/show_bug.cgi?id=3168

            Bug ID: 3168
           Summary: ${rfc2047:} expansion is generating encoded-words
                    longer than permitted in RFC 2047
           Product: Exim
           Version: 4.98.2
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: String expansion
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Section 2 of RFC 2047 states:

====

An 'encoded-word' may not be more than 75 characters long, including
'charset', 'encoding', 'encoded-text', and delimiters.

====

However, it is trivial to generate an expansion which exceeds 75 characters in
a single encoded-word:

$ exim -be
'${rfc2047:1234567,1234567,1234567,1234567,1234567,1234567,1234567,}'
=?ISO-8859-1?Q?1234567=2C1234567=2C1234567=2C1234567=2C1234567=2C1234567=2C1234567=2C?=

$ exim -be
'${rfc2047:1234567,1234567,1234567,1234567,1234567,1234567,1234567,}' | wc -c
88

The issue seems to be that parse_quote_2047 in src/src/parse.c is counting the
equals-encoded characters as 1 character based on its length at input, rather
than the 3 characters it is in length at output. I also think that the magic
constant of 67 being compared against has some faulty assumptions built into
it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.