summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-05-11 02:57:48 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-05-11 02:57:48 +0000
commit7d8facc844f30db5b10a8061bd4752cbcd95d8e7 (patch)
tree399fd9c43eba525c2881dd078d1f72e3beca1e82
parentb5bc232a386fec71006d76b263a1d00986cfbaf5 (diff)
downloaddrakx-net-7d8facc844f30db5b10a8061bd4752cbcd95d8e7.tar
drakx-net-7d8facc844f30db5b10a8061bd4752cbcd95d8e7.tar.gz
drakx-net-7d8facc844f30db5b10a8061bd4752cbcd95d8e7.tar.bz2
drakx-net-7d8facc844f30db5b10a8061bd4752cbcd95d8e7.tar.xz
drakx-net-7d8facc844f30db5b10a8061bd4752cbcd95d8e7.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