File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public function prepare_items(): void {
47
47
$ query = new Query (
48
48
[
49
49
'per_page ' => $ per_page ,
50
- 's ' => $ _GET ['s ' ] ?? '' ,
50
+ 's ' => isset ( $ _GET ['s ' ] ) ? sanitize_text_field ( $ _GET [ ' s ' ] ) : '' ,
51
51
'site__in ' => isset ( $ _GET ['on_current_site ' ] ) ? get_current_blog_id () : '' ,
52
52
]
53
53
);
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ public function maybe_do_preview(): void {
35
35
36
36
$ site_id = (int ) ( $ _GET ['site_id ' ] ?? 0 );
37
37
$ post_id = (int ) ( $ _GET ['post_id ' ] ?? 0 );
38
- $ block_id = ( string ) ( $ _GET ['block_id ' ] ?? '' ) ;
39
- $ request_token = ( string ) ( $ _GET ['token ' ] ?? '' ) ;
38
+ $ block_id = isset ( $ _GET ['block_id ' ] ) ? sanitize_text_field ( ( string ) $ _GET [ ' block_id ' ] ) : '' ;
39
+ $ request_token = isset ( $ _GET ['token ' ] ) ? sanitize_text_field ( ( string ) $ _GET [ ' token ' ] ) : '' ;
40
40
//phpcs:enable WordPress.Security.NonceVerification.Recommended
41
41
42
42
if ( 0 === $ site_id || 0 === $ post_id || '' === $ block_id || '' === $ request_token ) {
You can’t perform that action at this time.
0 commit comments