[arch-projects] [netcfg] [PATCH 1/2] [scripts/wifi-menu]: Quote a text passphrase

Thomas Bächler thomas at archlinux.org
Thu Aug 9 11:29:22 EDT 2012


Am 09.08.2012 17:24, schrieb Jouke Witteveen:
> On Tue, Aug 7, 2012 at 10:11 PM, Thomas Bächler <thomas at archlinux.org> wrote:
>> Text passphrases may contain spaces and should be quoted in the netcfg profile
>> ---
>>  scripts/wifi-menu | 2 +-
>>  1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
>>
>> diff --git a/scripts/wifi-menu b/scripts/wifi-menu
>> index 10353f8..4b1db24 100755
>> --- a/scripts/wifi-menu
>> +++ b/scripts/wifi-menu
>> @@ -117,7 +117,7 @@ create_profile()
>>              key=$(wpa_passphrase "$1" "$key" | grep -m 1 "^[[:space:]]*psk=")
>>              key="KEY=${key#*psk=}"
>>          else
>> -            key="KEY=$(printf "%q" "$key")"
>> +            key="KEY='$(printf "%q" "$key")'"
>>          fi
>>      fi
>>      cat << EOF > "$PROFILE_DIR/$PROFILE"
>> --
>> 1.7.11.4
>>
> 
> The %q already takes care of that.

I see, it escapes.

Alright, this means my second patch needs adjustment (the second patch
is based on this). Should I resend it or can you fix it yourself?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20120809/e9bb5245/attachment.asc>


More information about the arch-projects mailing list