3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 02:19:26 +01:00

eap-mschapv2: Drop unneeded UTF-8 validation

As report by Denis those strings have already gone through validation.
This commit is contained in:
Andrew Zaborowski 2018-06-14 03:45:26 +02:00 committed by Denis Kenzior
parent 66e332fd4a
commit b9aaab9c63

View File

@ -634,9 +634,6 @@ err:
static bool set_password_from_string(struct eap_mschapv2_state *state,
const char *password)
{
if (!l_utf8_validate(password, strlen(password), NULL))
return false;
return mschapv2_nt_password_hash(password, state->password_hash);
}
@ -728,11 +725,6 @@ static int eap_mschapv2_check_settings(struct l_settings *settings,
password = l_strdup(secret->value);
validate:
if (!l_utf8_validate(password, strlen(password), NULL)) {
l_error("Password is not valid UTF-8");
return -EINVAL;
}
if (!mschapv2_nt_password_hash(password, hash))
return -EINVAL;