]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
wifi-scripts: fix handling spaces in wifi client config 22237/head
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 1 Mar 2026 18:41:50 +0000 (19:41 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 9 Mar 2026 23:48:19 +0000 (00:48 +0100)
Escape identity anonymous_identity password ca_cert and ca_cert2 in a wifi
client configuration. This fixes the handling of configuration options
containing spaces and other strings which need escaping.

Fixes: https://github.com/openwrt/openwrt/issues/22212
Link: https://github.com/openwrt/openwrt/pull/22237
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc

index e1cc93a806a74268089bfcc15a9a812a4f17978a..1104f10a1266166c15c940c30c49639a36cf72c4 100644 (file)
@@ -177,17 +177,19 @@ function setup_sta(data, config) {
        config.basic_rate = ratelist(config.basic_rate);
        config.mcast_rate = ratestr(config.mcast_rate);
 
-       network_append_string_vars(config, [ 'ssid' ]);
+       network_append_string_vars(config, [ 'ssid',
+               'identity', 'anonymous_identity', 'password',
+               'ca_cert', 'ca_cert2', 'client_cert', 'client_cert2', 'subject_match',
+               'private_key', 'private_key_passwd', 'private_key2', 'private_key2_passwd',
+                ]);
        network_append_vars(config, [
                'rsn_overriding', 'scan_ssid', 'noscan', 'disabled', 'multi_ap_profile', 'multi_ap_backhaul_sta',
                'ocv', 'beacon_prot', 'key_mgmt', 'sae_pwe', 'psk', 'sae_password', 'pairwise', 'group', 'bssid',
                'proto', 'mesh_fwding', 'mesh_rssi_threshold', 'frequency', 'fixed_freq',
                'disable_ht', 'disable_ht40', 'disable_vht', 'vht', 'max_oper_chwidth',
                'ht40', 'beacon_int', 'ieee80211w', 'basic_rate', 'mcast_rate',
-               'bssid_blacklist', 'bssid_whitelist', 'erp', 'ca_cert', 'identity',
-               'anonymous_identity', 'client_cert', 'private_key', 'private_key_passwd',
-               'subject_match', 'altsubject_match', 'domain_match', 'domain_suffix_match',
-               'ca_cert2', 'client_cert2', 'private_key2', 'private_key2_passwd', 'password',
+               'altsubject_match', 'domain_match', 'domain_suffix_match',
+               'bssid_blacklist', 'bssid_whitelist', 'erp',
                'dpp_connector', 'dpp_csign', 'dpp_netaccesskey',
        ]);
 }