Skip to content

Commit

Permalink
fix(acf-base.php): noces
Browse files Browse the repository at this point in the history
In a recent security update ACF changed nonce handling for ajax-fields (the old way no longer works):
https://github.com/AdvancedCustomFields/acf/releases/tag/6.3.2
  • Loading branch information
schuhwerk authored Jul 5, 2024
1 parent 06ca08a commit bd87774
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fields/acf-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ function __construct() {
function ajax_query() {

// validate
if ( ! acf_verify_ajax() ) {
$nonce = acf_request_arg( 'nonce', '' );
$key = acf_request_arg( 'field_key', '' );
if ( ! acf_verify_ajax( $nonce, $key ) ) {
die();
}

Expand Down Expand Up @@ -585,4 +587,4 @@ function input_admin_enqueue_scripts() {
// Enqueuing
wp_enqueue_script( 'acf-input-user-network' );
}
}
}

0 comments on commit bd87774

Please sign in to comment.