From 4091aa337859a79eca631daf5adb1396fae15e4e Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Tue, 2 Jun 2009 21:13:11 +0000 Subject: Properly handle wireless passwords with '#' character (#50670). --- lib/network/connection/wireless.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm index 2e14656..574467a 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -920,7 +920,8 @@ sub wpa_supplicant_read_conf() { foreach (cat_($::prefix . $wpa_supplicant_conf)) { if ($network) { #- in a "network = {}" block - if (/^\s*(\w+)=(.*?)(?:\s*#.*)?$/) { + # value is either the string with "quotes" - or a non-whitespace containing string + if (/^\s*(\w+)=\s*(?|([^"]\S*)|("[^"]*")).*$/) { $network->{$1} = $2; } elsif (/^\}/) { #- end of network block -- cgit v1.2.1