HTML API: Fixes for issues discovered while fuzzing.#11982
Conversation
d0d323a to
b44f02f
Compare
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
7d47eb5 to
c9990f9
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
c9990f9 to
568d467
Compare
Fuzz-testing was performed against the HTML API for finding edge cases that might be broken in the existing parsing code. A few issues were discovered with HTML normalization and warnings from out-of-bounds string reads. This patch contains new tests catching regressions on these behaviors and adds fixes for the discovered issues. A special-case for FORM closing tags inside TABLEs was added after investigation turned up that many normalization issues stem from this single issue, where `next_tag()` would already fail to proceed, but the normalization was continuing with already-created virtual tokens. This special-case should be investigated as more support is added to the HTML API to ensure that it couldn’t be removed for more robust core code.
568d467 to
6548ed9
Compare
Trac ticket: Core-65372
Fuzz-testing was performed against the HTML API for finding edge cases
that might be broken in the existing parsing code. A few issues were
discovered with HTML normalization and warnings from out-of-bounds
string reads.
This patch contains new tests catching regressions on these behaviors
and adds fixes for the discovered issues.
A special-case for FORM closing tags inside TABLEs was added after
investigation turned up that many normalization issues stem from this
single issue, where
next_tag()would already fail to proceed, but thenormalization was continuing with already-created virtual tokens. This
special-case should be investigated as more support is added to the HTML
API to ensure that it couldn’t be removed for more robust core code.