summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-06-04 16:37:13 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-06-04 16:37:13 +0000
commit459fd5d5f09e92a071d9862109d5886eea47e211 (patch)
tree8e725e93facd46eb5abb96f8f88da52d25cc5a64
parenta76a6e2ec2f29a77abce4b4732552569530a87e3 (diff)
downloaddrakx-net-459fd5d5f09e92a071d9862109d5886eea47e211.tar
drakx-net-459fd5d5f09e92a071d9862109d5886eea47e211.tar.gz
drakx-net-459fd5d5f09e92a071d9862109d5886eea47e211.tar.bz2
drakx-net-459fd5d5f09e92a071d9862109d5886eea47e211.tar.xz
drakx-net-459fd5d5f09e92a071d9862109d5886eea47e211.zip
Properly handle wireless passwords with '#' character (#50670).
-rw-r--r--lib/network/connection/wireless.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm
index 78c30a8..b0de565 100644
--- a/lib/network/connection/wireless.pm
+++ b/lib/network/connection/wireless.pm
@@ -921,7 +921,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