Skip to content

Commit

Permalink
Merge pull request #73 from wp-graphql/fix/#69-FILTER_SANITIZE_STRING…
Browse files Browse the repository at this point in the history
…-deprecated

fix: replace `filter_input` with `sanitize_text_field`
  • Loading branch information
jasonbahl authored Aug 4, 2023
2 parents 6f81e4f + ae24aa8 commit 66d8c55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Admin/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ public function graphql_types_ajax_callback(): void {
wp_send_json( __( 'No form data.', 'wp-graphql-acf' ) );
}

// @phpstan-ignore-next-line
if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( filter_input( INPUT_POST, 'nonce', FILTER_SANITIZE_STRING ), 'wp_graphql_acf' ) ) {
if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'wp_graphql_acf' ) ) {
wp_send_json_error();
}

Expand Down

0 comments on commit 66d8c55

Please sign in to comment.