Bug 145224

Summary: Quote Mark Support in WPA Keys
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Michael Pomraning <mjp-novell>
Component: NetworkAssignee: Joachim Gleissner <joachim.gleissner>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: suse-beta
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Michael Pomraning 2006-01-24 16:19:55 UTC
Quote marks in WPA PSKs aren't properly handled by ifup-wireless -- the 'SUFFIX' probing around line 515 chokes on the quotes (other uses of eval+echo are similarly brittle).  Command-line reproduction:
 
   $ SUFFIX=''
   $ WIRELESS_WPA_PSK="\"Why, Linux,\" I'd replied."
   $ L="`eval \$WIRELESS_WPA_PSK$SUFFIX`"
   bash: eval: line 1: unexpected EOF while looking for matching `''
   bash: eval: line 2: syntax error: unexpected end of file

A less legible command substitution/eval+printf can handle this, however:

   $ SUFFIX=''
   $ WIRELESS_WPA_PSK="\"Why, Linux,\" I'd replied."
   $ L=$(eval printf '%s' \"\$WIRELESS_WPA_PSK$SUFFIX\")
   $ echo $L
   "Why, Linux," I'd replied.

(Now, whether or not YaST can convey the quotes properly and whether wpa_supplicant files are correctly written is a different matter...)

Thanks,
Mike
Comment 1 Joachim Gleissner 2006-02-22 14:44:43 UTC
Should be fixed by the sysconfig update.

*** This bug has been marked as a duplicate of 118157 ***