Sanitize license key inputs

This commit is contained in:
Brian Miyaji
2021-11-05 22:24:05 +09:00
parent 9a35699d78
commit 0a4b6726df

View File

@@ -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'];