Skip to content

Commit

Permalink
:bugs: Fixed nonce mismatch issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydeeptrivedi13 committed Dec 20, 2024
1 parent 6b1933e commit d560628
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions edwiser-bridge/admin/assets/js/eb-setup-wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@
'action': 'eb_' + check,
'url': url.trim(),
'token': token,
'_wpnonce_field': eb_setup_wizard.nonce,
'_wpnonce_field': eb_setup_wizard.sync_nonce,
},
success: function (response) {
if ( 'json_valid' == check ) {
Expand Down Expand Up @@ -773,7 +773,7 @@
'action': 'eb_token_validation_fix',
'url': url.trim(),
'token': token,
'_wpnonce_field': eb_setup_wizard.nonce,
'_wpnonce_field': eb_setup_wizard.sync_nonce,
},
success: function (response) {
if ( isValidJsonString( response ) && typeof response == "string" ) {
Expand Down Expand Up @@ -812,7 +812,7 @@
url: eb_setup_wizard.ajax_url,
data: {
'action': 'eb_permalink_setting_fix',
'_wpnonce_field': eb_setup_wizard.nonce,
'_wpnonce_field': eb_setup_wizard.sync_nonce,
},
success: function (response) {
if ( isValidJsonString( response ) && typeof response == "string" ) {
Expand Down Expand Up @@ -869,7 +869,7 @@
url: eb_setup_wizard.ajax_url,
data: {
'action': 'eb_permalink_setting_fix_save',
'_wpnonce_field': eb_setup_wizard.nonce,
'_wpnonce_field': eb_setup_wizard.sync_nonce,
},
success: function (response) {
if ( isValidJsonString( response ) && typeof response == "string" ) {
Expand All @@ -891,7 +891,7 @@
url: eb_setup_wizard.ajax_url,
data: {
'action': 'eb_htaccess_create',
'_wpnonce_field': eb_setup_wizard.nonce,
'_wpnonce_field': eb_setup_wizard.sync_nonce,
},
success: function (response) {
if ( isValidJsonString( response ) && typeof response == "string" ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ public function __construct() {
add_action( 'wp_ajax_eb_setup_test_connection', array( $this, 'eb_setup_test_connection_handler' ) );
add_action( 'wp_ajax_eb_setup_manage_license', array( $this, 'eb_setup_manage_license' ) );
add_action( 'wp_ajax_eb_setup_validate_license', array( $this, 'eb_setup_validate_license' ) );
add_action( 'wp_ajax_eb_json_valid', array( $this, 'check_valid_json_response' ) );
add_action( 'wp_ajax_eb_token_validation', array( $this, 'check_valid_token' ) );
add_action( 'wp_ajax_eb_token_validation_fix', array( $this, 'fix_valid_token' ) );
add_action( 'wp_ajax_eb_server_blocking_check', array( $this, 'check_moodle_webservice_accessible' ) );
add_action( 'wp_ajax_eb_permalink_setting', array( $this, 'check_permalink_setting_valid' ) );
add_action( 'wp_ajax_eb_permalink_setting_fix', array( $this, 'fix_permalink_setting_valid' ) );
add_action( 'wp_ajax_eb_permalink_setting_fix_save', array( $this, 'fix_permalink_setting_valid_save_changes' ) );
add_action( 'wp_ajax_eb_htaccess_create', array( $this, 'create_htaccess_file' ) );
add_action( 'wp_ajax_eb_get_endpoint', array( $this, 'check_get_endpoint_registered' ) );
add_action( 'wp_ajax_eb_post_endpoint', array( $this, 'check_post_endpoint_registered' ) );
add_action( 'wp_ajax_eb_json_valid_fix', array( $this, 'fix_valid_json_response' ) );
// add_action( 'wp_ajax_eb_json_valid', array( $this, 'check_valid_json_response' ) );
// add_action( 'wp_ajax_eb_token_validation', array( $this, 'check_valid_token' ) );
// add_action( 'wp_ajax_eb_token_validation_fix', array( $this, 'fix_valid_token' ) );
// add_action( 'wp_ajax_eb_server_blocking_check', array( $this, 'check_moodle_webservice_accessible' ) );
// add_action( 'wp_ajax_eb_permalink_setting', array( $this, 'check_permalink_setting_valid' ) );
// add_action( 'wp_ajax_eb_permalink_setting_fix', array( $this, 'fix_permalink_setting_valid' ) );
// add_action( 'wp_ajax_eb_permalink_setting_fix_save', array( $this, 'fix_permalink_setting_valid_save_changes' ) );
// add_action( 'wp_ajax_eb_htaccess_create', array( $this, 'create_htaccess_file' ) );
// add_action( 'wp_ajax_eb_get_endpoint', array( $this, 'check_get_endpoint_registered' ) );
// add_action( 'wp_ajax_eb_post_endpoint', array( $this, 'check_post_endpoint_registered' ) );
// add_action( 'wp_ajax_eb_json_valid_fix', array( $this, 'fix_valid_json_response' ) );
}

/**
Expand Down

0 comments on commit d560628

Please sign in to comment.