Message218618
| Author |
pfalcon |
| Recipients |
pfalcon |
| Date |
2014年05月15日.16:37:34 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1400171855.37.0.067918723363.issue21511@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Lib/quopri.py for version 3.3..3.5-tip contains following code:
ESCAPE = b'='
...
line = input.readline()
if not line: break
i, n = 0, len(line)
if n > 0 and line[n-1:n] == b'\n':
...
elif i+1 < n and line[i+1] == ESCAPE:
So, ESCAPE is defined as bytes, we see that "line" is read as bytes, and characters are accessed using idiom like "line[n-1:n]", but then it uses "line[i+1]", which returns int and thus will never be equal to ESCAPE.
I'm not sure what exact semantic condition that branch represents, for me it looks like "==" sequence to be decoded as "=". But I don't see such encoding variant in http://en.wikipedia.org/wiki/Quoted-printable . Either way, replacing that condition with "and False", still passes test_quopri.py |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年05月15日 16:37:35 | pfalcon | set | recipients:
+ pfalcon |
| 2014年05月15日 16:37:35 | pfalcon | set | messageid: <1400171855.37.0.067918723363.issue21511@psf.upfronthosting.co.za> |
| 2014年05月15日 16:37:35 | pfalcon | link | issue21511 messages |
| 2014年05月15日 16:37:34 | pfalcon | create |
|