@@ -489,7 +489,7 @@ private function get_referrer_url( $form_data ) {
489
489
490
490
// If the request includes the page_url, return that URL.
491
491
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
493
493
}
494
494
495
495
// Return the AJAX URL.
@@ -715,7 +715,7 @@ public function maybe_display_notice() {
715
715
sprintf (
716
716
'%s %s ' ,
717
717
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
719
719
)
720
720
);
721
721
}
@@ -733,7 +733,7 @@ public function maybe_get_and_store_access_token() {
733
733
if ( ! array_key_exists ( 'page ' , $ _REQUEST ) ) { // phpcs:ignore WordPress.Security.NonceVerification
734
734
return ;
735
735
}
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
737
737
return ;
738
738
}
739
739
@@ -750,7 +750,7 @@ public function maybe_get_and_store_access_token() {
750
750
}
751
751
752
752
// 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
754
754
755
755
// Exchange the authorization code and verifier for an access token.
756
756
$ api = new Integrate_ConvertKit_WPForms_API (
@@ -843,7 +843,7 @@ public function delete_resource_cache() {
843
843
}
844
844
845
845
// Sanitize data.
846
- $ account_id = sanitize_text_field ( $ _POST ['key ' ] );
846
+ $ account_id = sanitize_text_field ( wp_unslash ( $ _POST ['key ' ] ) );
847
847
848
848
// Get API instance.
849
849
$ api = $ this ->get_api_instance ( $ account_id );
0 commit comments