@@ -489,7 +489,7 @@ private function get_referrer_url( $form_data ) {
489489
490490 // If the request includes the page_url, return that URL.
491491 if ( array_key_exists ( 'page_url ' , $ _REQUEST ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
492- return esc_url ( $ _REQUEST ['page_url ' ] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
492+ return esc_url ( sanitize_text_field ( wp_unslash ( $ _REQUEST ['page_url ' ] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
493493 }
494494
495495 // Return the AJAX URL.
@@ -715,7 +715,7 @@ public function maybe_display_notice() {
715715 sprintf (
716716 '%s %s ' ,
717717 esc_html__ ( 'Kit: ' , 'integrate-convertkit-wpforms ' ),
718- sanitize_text_field ( $ _REQUEST ['error_description ' ] ) // phpcs:ignore WordPress.Security.NonceVerification
718+ sanitize_text_field ( wp_unslash ( $ _REQUEST ['error_description ' ] ) ) // phpcs:ignore WordPress.Security.NonceVerification
719719 )
720720 );
721721 }
@@ -733,7 +733,7 @@ public function maybe_get_and_store_access_token() {
733733 if ( ! array_key_exists ( 'page ' , $ _REQUEST ) ) { // phpcs:ignore WordPress.Security.NonceVerification
734734 return ;
735735 }
736- if ( $ _REQUEST ['page ' ] !== 'wpforms-settings ' ) { // phpcs:ignore WordPress.Security.NonceVerification
736+ if ( sanitize_text_field ( wp_unslash ( $ _REQUEST ['page ' ] ) ) !== 'wpforms-settings ' ) { // phpcs:ignore WordPress.Security.NonceVerification
737737 return ;
738738 }
739739
@@ -750,7 +750,7 @@ public function maybe_get_and_store_access_token() {
750750 }
751751
752752 // Sanitize token.
753- $ authorization_code = sanitize_text_field ( $ _REQUEST ['code ' ] ); // phpcs:ignore WordPress.Security.NonceVerification
753+ $ authorization_code = sanitize_text_field ( wp_unslash ( $ _REQUEST ['code ' ] ) ); // phpcs:ignore WordPress.Security.NonceVerification
754754
755755 // Exchange the authorization code and verifier for an access token.
756756 $ api = new Integrate_ConvertKit_WPForms_API (
@@ -843,7 +843,7 @@ public function delete_resource_cache() {
843843 }
844844
845845 // Sanitize data.
846- $ account_id = sanitize_text_field ( $ _POST ['key ' ] );
846+ $ account_id = sanitize_text_field ( wp_unslash ( $ _POST ['key ' ] ) );
847847
848848 // Get API instance.
849849 $ api = $ this ->get_api_instance ( $ account_id );
0 commit comments