Merge pull request #25466 from woocommerce/update/25464
Trim whitespaces and strip slashes from MaxMind License Key
This commit is contained in:
commit
b948545283
|
@ -132,7 +132,10 @@ class WC_Integration_MaxMind_Geolocation extends WC_Integration {
|
|||
* @throws Exception When the license key is invalid.
|
||||
*/
|
||||
public function validate_license_key_field( $key, $value ) {
|
||||
// Empty license keys have no need to validate the data.
|
||||
// Trim whitespaces and strip slashes.
|
||||
$value = $this->validate_password_field( $key, $value );
|
||||
|
||||
// Empty license keys have no need test downloading a database.
|
||||
if ( empty( $value ) ) {
|
||||
return $value;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue