Opened 13 hours ago
#66095 new defect (bug)
Opening the revisions screen for a page with very long lines may cuase an execution timeout crash
| Reported by: | iverok | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Revisions | Version: | 7.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
We have a certain page with very long lines that crashes with a 30 second timeout when using the revisions screen, specifically on lines 212 or 225 on wp-includes/Text/Diff/Engine/native.php, in the _diag method. For very long lines this method will not complete in a reasonable time.
The very long lines are caused by a/several static blocks. Specifically, we discovered this with the 'wp:getbowtied/products-carousel' block of the product-blocks-for-woocommerce plugin but it could occur with any content producing long lines. The lines in question were 245KB and 226KB long.
The major issue with this bug is that the revisions screen is used as an error handling tool. If a user has used static blocks or otherwise have problematically long lines in a page, this tool will instead cause a crash, possibly leaving the user no way to recover.
We worked around this issue with a filter on '_wp_post_revision_field_post_content' were we replaced the specific static block code with a hash of the contents; not a general solution.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)