From b9aaab9c637c3ec550a71cd52b614a2266ad4801 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Thu, 14 Jun 2018 03:45:26 +0200 Subject: [PATCH] eap-mschapv2: Drop unneeded UTF-8 validation As report by Denis those strings have already gone through validation. --- src/eap-mschapv2.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/eap-mschapv2.c b/src/eap-mschapv2.c index 5ae472a7..60fe983b 100644 --- a/src/eap-mschapv2.c +++ b/src/eap-mschapv2.c @@ -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;