Skip to content

Commit 25649e1

Browse files
committed
Only accept integer as client ID.
1 parent 9f006f0 commit 25649e1

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

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

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,10 @@ public function register_routes(): void {
151151
'required' => true,
152152
'type' => array( 'object', 'null' ),
153153
),
154-
/*
155-
* client_id accepts both string and integer values:
156-
* - 'minimum' bounds the integer form.
157-
* - 'minLength' / 'maxLength' bound the string form.
158-
*/
159154
'client_id' => array(
160-
'minimum' => 1,
161-
'minLength' => 1,
162-
'maxLength' => 32, // Matches the client_id column width in wp-admin/includes/schema.php.
163-
'required' => true,
164-
'type' => array( 'string', 'integer' ),
165-
'sanitize_callback' => function ( $value ) {
166-
return (string) $value;
167-
},
155+
'minimum' => 1,
156+
'required' => true,
157+
'type' => 'integer',
168158
),
169159
'room' => array(
170160
'required' => true,

0 commit comments

Comments
 (0)