diff options
author | Michele Guerini Rocco <rnhmjoj@users.noreply.github.com> | 2024-04-21 16:07:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-21 16:07:42 +0200 |
commit | 8b93a430dc64f79d799159ba22b76774b4cd1979 (patch) | |
tree | 52df36e8eb3297f90b9790ebb71bc5ece7e4a6da /nixos/tests/wpa_supplicant.nix | |
parent | 23fc571cc3513eb43fcc8b711639adb088e016b1 (diff) | |
parent | 89a1bde018ad10f723658a988e5aee0b78846b73 (diff) |
Merge pull request #305689 from rnhmjoj/pr-fix-wpa-secrets
nixos/wireless: correctly handle secrets containing &
Diffstat (limited to 'nixos/tests/wpa_supplicant.nix')
-rw-r--r-- | nixos/tests/wpa_supplicant.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/tests/wpa_supplicant.nix b/nixos/tests/wpa_supplicant.nix index 9288eba189c84..5e3b39f27ecf3 100644 --- a/nixos/tests/wpa_supplicant.nix +++ b/nixos/tests/wpa_supplicant.nix @@ -102,13 +102,15 @@ import ./make-test-python.nix ({ pkgs, lib, ...}: test2.psk = "@PSK_SPECIAL@"; # should be replaced test3.psk = "@PSK_MISSING@"; # should not be replaced test4.psk = "P@ssowrdWithSome@tSymbol"; # should not be replaced + test5.psk = "@PSK_AWK_REGEX@"; # should be replaced }; # secrets environmentFile = pkgs.writeText "wpa-secrets" '' PSK_VALID="S0m3BadP4ssw0rd"; # taken from https://github.com/minimaxir/big-list-of-naughty-strings - PSK_SPECIAL=",./;'[]\-= <>?:\"{}|_+ !@#$%^\&*()`~"; + PSK_SPECIAL=",./;'[]\/\-= <>?:\"{}|_+ !@#$%^&*()`~"; + PSK_AWK_REGEX="PassowrdWith&symbol"; ''; }; }; @@ -186,6 +188,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...}: basic.fail(f"grep -q @PSK_SPECIAL@ {config_file}") basic.succeed(f"grep -q @PSK_MISSING@ {config_file}") basic.succeed(f"grep -q P@ssowrdWithSome@tSymbol {config_file}") + basic.succeed(f"grep -q 'PassowrdWith&symbol' {config_file}") with subtest("WPA2 fallbacks have been generated"): assert int(basic.succeed(f"grep -c sae-only {config_file}")) == 1 |