3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

network: validate passphrase on _set_passphrase

This commit is contained in:
James Prestwood 2019-09-18 09:02:58 -07:00 committed by Denis Kenzior
parent 42e083cf9b
commit 27ae3ce14d

View File

@ -275,6 +275,9 @@ bool network_set_passphrase(struct network *network, const char *passphrase)
if (network_get_security(network) != SECURITY_PSK)
return false;
if (!crypto_passphrase_is_valid(passphrase))
return false;
if (!network_settings_load(network))
network->settings = l_settings_new();