Opened 4 months ago
Closed 4 months ago
#64781 closed defect (bug) (fixed)
Real-time collaboration compaction updates can result in bad request (400)
| Reported by: | czarate | Owned by: | ellatrix |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0 |
| Component: | Editor | Version: | 7.0 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | rest-api |
Description
When a user sends a stale compaction update to WP_HTTP_Polling_Sync_Server, it falls through the switch statement and results in a rest_invalid_update_type error (bad request).
This generally has no ill effect since the compaction request is rescinded on the next polling cycle, but it could cause confusion for users who are monitoring client-side requests or server logs.
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/64781
When a user sends a stale compaction update to
WP_HTTP_Polling_Sync_Server, it falls through the switch statement and results in arest_invalid_update_typeerror (bad request).This generally has no ill effect since the compaction request is rescinded on the next polling cycle, but it could cause confusion for users who are monitoring client-side requests or server logs.
To fix, replace the
breakafter the$has_newer_compactioncheck withreturn trueso that the stale compaction is silently discarded instead of falling through. Covered by unit test.