Skip to content

Commit 7f57c63

Browse files
committed
Add maxLength validation for sync room name to match DB column size
1 parent e23ff79 commit 7f57c63

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/wp-includes/collaboration/class-wp-http-polling-sync-server.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ public function register_routes(): void {
130130
'type' => 'integer',
131131
),
132132
'room' => array(
133-
'required' => true,
134-
'type' => 'string',
135-
'pattern' => '^[^/]+/[^/:]+(?::\\S+)?$',
133+
'required' => true,
134+
'type' => 'string',
135+
'pattern' => '^[^/]+/[^/:]+(?::\\S+)?$',
136+
'maxLength' => 255, // The size of the wp_sync_updates.room column.
136137
),
137138
'updates' => array(
138139
'items' => $typed_update_args,

0 commit comments

Comments
 (0)