Skip to content

Commit 6b32132

Browse files
authored
Merge pull request #562 from WebDevStudios/feature/CC-260-nonce-type
Renamed nonce typo and added nonce verification.
2 parents 565bdc4 + a2bd45d commit 6b32132

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/class-lists.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ public function show_duplicate_list_message() {
807807
*/
808808
public function add_force_sync_button( $views ) {
809809

810-
$link = wp_nonce_url( add_query_arg( [ 'ctct_list_sync' => 'true' ] ), 'ctct_reysncing', 'ctct_resyncing' );
810+
$link = wp_nonce_url( add_query_arg( [ 'ctct_list_sync' => 'true' ] ), 'ctct_resyncing', 'ctct_resyncing' );
811811

812812
$views['sync'] = '<strong><a href="' . $link . '">' . __( 'Sync Lists with Constant Contact', 'constant-contact-forms' ) . '</a></strong>';
813813

@@ -825,7 +825,7 @@ public function check_for_list_sync_request() {
825825

826826
$ctct_resyncing = filter_input( INPUT_GET, 'ctct_resyncing', FILTER_SANITIZE_STRING );
827827

828-
if ( ! isset( $ctct_resyncing ) || ! is_admin() ) {
828+
if ( ! isset( $ctct_resyncing ) || ! wp_verify_nonce( $ctct_resyncing, 'ctct_resyncing' ) || ! is_admin() ) {
829829
return;
830830
}
831831

0 commit comments

Comments
 (0)