[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34469: 26.1; EWW stops renderring web page on null byte
From: |
Paul Eggert |
Subject: |
bug#34469: 26.1; EWW stops renderring web page on null byte |
Date: |
Wed, 27 Feb 2019 17:52:52 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
Thanks for fixing that bug. However, replacing NUL with \0 sounds iffy.
Even if we assume that a web page contains C-like code, the replacement
would mishandle a NUL followed by an octal digit, since the replacement
would look like \07 which would be interpreted as a BEL character, not
as a NULL followed by a digit 7. And web pages do not typically contain
C code, so the replacement \0 might cause other trouble.
Instead, it sounds better to replace NUL with the four-character
sequence "�", as this is a standard HTML way to represent a NUL
character. I installed the attached patch to do this.
In my little tests with this patch, libxml2 typically handled � by
discarding it and continuing to parse, which is better than ignoring the
rest of the input. In some cases libxml2 handles � by discarding
later input up to a delimiter; although this is bad, it's a libxml2 bug
that attackers can exploit independently of what Emacs does with NUL,
since attackers can simply use �.
0001-Escape-HTML-NUL-as-0-in-eww.patch
Description: Text Data
- bug#34469: 26.1; EWW stops renderring web page on null byte, (continued)
- bug#34469: 26.1; EWW stops renderring web page on null byte, Nicholas Drozd, 2019/02/16
- bug#34469: 26.1; EWW stops renderring web page on null byte, Glenn Morris, 2019/02/18
- bug#34469: 26.1; EWW stops renderring web page on null byte, Robert Pluim, 2019/02/19
- bug#34469: 26.1; EWW stops renderring web page on null byte, Eli Zaretskii, 2019/02/19
- bug#34469: 26.1; EWW stops renderring web page on null byte, Robert Pluim, 2019/02/19
- bug#34469: 26.1; EWW stops renderring web page on null byte, Eli Zaretskii, 2019/02/19
- bug#34469: 26.1; EWW stops renderring web page on null byte, Robert Pluim, 2019/02/20
- bug#34469: 26.1; EWW stops renderring web page on null byte, Robert Pluim, 2019/02/27
- bug#34469: 26.1; EWW stops renderring web page on null byte, Eli Zaretskii, 2019/02/27
- bug#34469: 26.1; EWW stops renderring web page on null byte, Robert Pluim, 2019/02/27
bug#34469: 26.1; EWW stops renderring web page on null byte,
Paul Eggert <=