[wp-trac] [WordPress Trac] #64781: Real-time collaboration compaction updates can result in bad request (400)
WordPress Trac
noreply at wordpress.org
Thu Mar 5 09:23:41 UTC 2026
#64781: Real-time collaboration compaction updates can result in bad request (400)
--------------------------------------+-----------------------
Reporter: czarate | Owner: ellatrix
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 7.0
Component: Editor | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses: rest-api
--------------------------------------+-----------------------
Changes (by ellatrix):
* owner: (none) => ellatrix
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"61839" 61839]:
{{{
#!CommitTicketReference repository="" revision="61839"
Real-time collaboration: prevent fall-through in sync polling server.
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.
To fix, replace the break after the $has_newer_compaction check with
return true so that the stale compaction is silently discarded instead of
falling through. Covered by unit test.
Developed in: https://github.com/WordPress/wordpress-develop/pull/11118.
Syncs: https://github.com/WordPress/gutenberg/pull/76060.
Fixes #64781.
Props czarate, mindctrl.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64781#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list