Skip to content

Commit c9bc15c

Browse files
committed
Escape room name in sync permission error message
The room string is already constrained by REST schema regex validation, but esc_html() future-proofs against the regex loosening or the message being reused in an HTML context.
1 parent 8d8c603 commit c9bc15c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function check_permissions( WP_REST_Request $request ) {
198198
sprintf(
199199
/* translators: %s: The room name encodes the current entity being synced. */
200200
__( 'You do not have permission to sync this entity: %s.' ),
201-
$room
201+
esc_html( $room )
202202
),
203203
array( 'status' => rest_authorization_required_code() )
204204
);

0 commit comments

Comments
 (0)