mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
network: validate passphrase on _set_passphrase
This commit is contained in:
parent
42e083cf9b
commit
27ae3ce14d
@ -275,6 +275,9 @@ bool network_set_passphrase(struct network *network, const char *passphrase)
|
|||||||
if (network_get_security(network) != SECURITY_PSK)
|
if (network_get_security(network) != SECURITY_PSK)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (!crypto_passphrase_is_valid(passphrase))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!network_settings_load(network))
|
if (!network_settings_load(network))
|
||||||
network->settings = l_settings_new();
|
network->settings = l_settings_new();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user