From 0a4b6726df96da62715de7532551ce545fb28e7e Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Fri, 5 Nov 2021 22:24:05 +0900 Subject: [PATCH] Sanitize license key inputs --- includes/admin/settings/class-sp-settings-licenses.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/admin/settings/class-sp-settings-licenses.php b/includes/admin/settings/class-sp-settings-licenses.php index c6534b86..0f893538 100644 --- a/includes/admin/settings/class-sp-settings-licenses.php +++ b/includes/admin/settings/class-sp-settings-licenses.php @@ -127,7 +127,7 @@ class SP_Settings_Licenses extends SP_Settings_Page { return; // retrieve the license key - $license = trim( $_POST[ 'sp_license_key_' . $id ] ); + $license = trim( sanitize_text_field( $_POST[ 'sp_license_key_' . $id ] ) ); // get the name of the product $name = $this->licenses[ $id ]['name']; @@ -174,7 +174,7 @@ class SP_Settings_Licenses extends SP_Settings_Page { return; // retrieve the license key - $license = trim( $_POST[ 'sp_license_key_' . $id ] ); + $license = trim( sanitize_text_field( $_POST[ 'sp_license_key_' . $id ] ) ); // get the name of the product $name = $this->licenses[ $id ]['name'];