From e4a7dd1200687f9d8af9516e5ecf39bf6e081a04 Mon Sep 17 00:00:00 2001 From: Sibert Date: Mon, 26 Sep 2022 22:47:07 +0200 Subject: [PATCH] Allow for SSID's containing a single quote SSID's are allowed to contain single quotes ('). This change allows the configurator to work with SSID's (and passphrases) to contain single quotes. Previous version causes following behavior: SSID: It's a great network name Pass: RatOSIsGreat $ wpa_passphrase 'It's a great network name' 'RatOSIsGreat' This won't work, so it should be $ wpa_passphrase "It's a great network name" "RatOSIsGreat" hence this change --- src/scripts/add-wifi-network.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/add-wifi-network.sh b/src/scripts/add-wifi-network.sh index 76b699838..36efe4083 100755 --- a/src/scripts/add-wifi-network.sh +++ b/src/scripts/add-wifi-network.sh @@ -3,7 +3,7 @@ if [ ! "$EUID" -eq 0 ]; then echo "This script must run as root" exit -1 fi -NETWORK=$(sh -c "wpa_passphrase '$1' '$2'") +NETWORK=$(sh -c "wpa_passphrase \"$1\" \"$2\"") if [[ ! $NETWORK =~ ^network ]]; then echo "Invalid wifi credentials" exit -1