From ac2fb0e93d1a7c9c41eba5c77e7e62a9eb07691b Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 22 Mar 2023 10:21:30 +0100 Subject: [PATCH] nmcli: fix generating hotspot password The generated password was all non-alphanumeric characters. Fixes: 6e96d7173168 ('all: use nm_random_*() instead of g_random_*()') --- src/nmcli/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nmcli/devices.c b/src/nmcli/devices.c index 6e7affdf18..69dc0db864 100644 --- a/src/nmcli/devices.c +++ b/src/nmcli/devices.c @@ -4111,7 +4111,7 @@ generate_wpa_key(char *key, size_t len) do { c = nm_random_u64_range_full(33, 126, TRUE); /* too many non alphanumeric characters are hard to remember for humans */ - } while (g_ascii_isalnum(c)); + } while (!g_ascii_isalnum(c)); key[i] = (char) c; }