]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
The output of dialog needs to be sanitized
authordteske <dteske@FreeBSD.org>
Tue, 13 Dec 2016 01:41:06 +0000 (01:41 +0000)
committerdteske <dteske@FreeBSD.org>
Tue, 13 Dec 2016 01:41:06 +0000 (01:41 +0000)
for portability/compatibility requirements

usr.sbin/bsdinstall/scripts/wlanconfig

index f892d28d7fc1d492a502187f04ac463fd3dee551..d2b307f88c7cf5332474e354ea2585dbe68ec667 100755 (executable)
@@ -126,6 +126,7 @@ dialog_country_select()
                $regdomains                            \
                2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
        )
+       f_dialog_data_sanitize regdomain
 
        f_dialog_title "Country selection"
        prompt="Select your country."
@@ -142,6 +143,7 @@ dialog_country_select()
                $countries                           \
                2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
        )
+       f_dialog_data_sanitize country
 
        country_set "$regdomain" "$country"
 }
@@ -245,7 +247,9 @@ while :; do
                $( echo $NETWORKS | tr '\n' ' ' )" \
                2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
        )
-       case $? in
+       retval=$?
+       f_dialog_data_sanitize NETWORK
+       case $retval in
        $DIALOG_OK) break ;;
        $DIALOG_CANCEL)
                # here we ask if the user wants to select the network manually