Skip to content

Commit 5f8567a

Browse files
sanitize the post id
1 parent 5462480 commit 5f8567a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public function feedzy_register_rest_route() {
285285
'methods' => 'POST',
286286
'callback' => array( $this, 'feedzy_rest_route' ),
287287
'permission_callback' => function ( WP_REST_Request $request ) {
288-
$post_id = $request->get_param( 'postId' );
288+
$post_id = absint( $request->get_param( 'postId' ) );
289289
return current_user_can( 'edit_post', $post_id );
290290
},
291291
'args' => array(

0 commit comments

Comments
 (0)