add sanitize_text_field

This commit is contained in:
Paul Sealock 2019-02-22 12:23:37 +13:00
parent 3f8b3bc1fd
commit 158cf33ded
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ class WC_Tracks_Client {
}
// Start with a previously set cookie.
$anon_id = isset( $_COOKIE['tk_ai'] ) ? wp_unslash( $_COOKIE['tk_ai'] ) : false; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
$anon_id = isset( $_COOKIE['tk_ai'] ) ? sanitize_text_field( wp_unslash( $_COOKIE['tk_ai'] ) ) : false; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
// If there is no cookie, apply a saved id.
if ( ! $anon_id ) {