Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1045687 - anaconda fails when connected to a Wi-Fi network with a '#' in the SSID
Summary: anaconda fails when connected to a Wi-Fi network with a '#' in the SSID
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:1cf7787b12bff47ba8a7e4b0e1c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-21 08:06 UTC by Justin Paupore
Modified: 2015-05-29 17:02 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-29 17:02:18 UTC
Type: ---


Attachments (Terms of Use)
File: anaconda-tb (304.75 KB, text/plain)
2013-12-21 08:06 UTC, Justin Paupore
no flags Details
File: anaconda.log (1.49 KB, text/plain)
2013-12-21 08:06 UTC, Justin Paupore
no flags Details
File: environ (525 bytes, text/plain)
2013-12-21 08:06 UTC, Justin Paupore
no flags Details
File: journalctl (192.88 KB, text/plain)
2013-12-21 08:06 UTC, Justin Paupore
no flags Details
File: lsblk_output (2.91 KB, text/plain)
2013-12-21 08:06 UTC, Justin Paupore
no flags Details
File: nmcli_dev_list (26.81 KB, text/plain)
2013-12-21 08:06 UTC, Justin Paupore
no flags Details
File: os_info (375 bytes, text/plain)
2013-12-21 08:06 UTC, Justin Paupore
no flags Details
File: program.log (48.88 KB, text/plain)
2013-12-21 08:07 UTC, Justin Paupore
no flags Details
File: storage.log (93.74 KB, text/plain)
2013-12-21 08:07 UTC, Justin Paupore
no flags Details
File: ifcfg.log (2.27 KB, text/plain)
2013-12-21 08:07 UTC, Justin Paupore
no flags Details

Description Justin Paupore 2013-12-21 08:06:46 UTC
Description of problem:
**Issue:**

anaconda fails when connected to a Wi-Fi network with a '#' in the SSID

**To Reproduce:**

1. Connect to a network with a '#' in the SSID.
2. Launch anaconda.

**Expected Behavior:**

anaconda starts up normally.

**Observed Behavior:**

anaconda crashes on an unhandled ValueError.

**Analysis:**

On startup, anaconda calls SimpleConfigFile.read() on every ifcfg file in /etc/sysconfig/network-scripts. For each line of the ifcfg file, SimpleConfigFile.read strips out comments, which it defines as anything following a '#' character on a line, then unquotes the string:

        s = line.strip()
        if '#' in s:
            s = s[:s.find('#')] # remove from comment to EOL
            s = s.strip()       # and any unnecessary whitespace
        key, eq, val = s.partition('=')
        if self.read_unquote:
            val = unquote(val)

unquote() passes the value to shlex.split:

        def unquote(s):
            return ' '.join(shlex.split(s))

If Wi-Fi network with a '#' in the name has an ifcfg file, it will contain lines like this:

        ESSID="Example Network #1"

After comments are stripped, this line becomes:

        ESSID="Example Network 

val then becomes:

        "Example Network

shlex.split() then throws a ValueError during the unquote() call, due to the lack of a closing quotation mark. This ValueError goes unhandled, causing anaconda to crash.

**Workaround:**

Delete the offending ifcfg file before launching anaconda.

Version-Release number of selected component:
anaconda-20.25.15-1.fc20.x86_64

The following was filed automatically by anaconda:
anaconda 20.25.15-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/shlex.py", line 172, in read_token
    raise ValueError, "No closing quotation"
  File "/usr/lib64/python2.7/shlex.py", line 96, in get_token
    raw = self.read_token()
  File "/usr/lib64/python2.7/shlex.py", line 269, in next
    token = self.get_token()
  File "/usr/lib64/python2.7/shlex.py", line 279, in split
    return list(lex)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/simpleconfig.py", line 26, in unquote
    return ' '.join(shlex.split(s))
  File "/usr/lib64/python2.7/site-packages/pyanaconda/simpleconfig.py", line 123, in _parseline
    val = unquote(val)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/simpleconfig.py", line 69, in read
    key, value = self._parseline(line)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/network.py", line 236, in read
    SimpleConfigFile.read(self)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/network.py", line 767, in find_ifcfg_file
    ifcfg.read()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/network.py", line 752, in find_ifcfg_file_of_device
    root_path)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/network.py", line 291, in dumpMissingDefaultIfcfgs
    if find_ifcfg_file_of_device(devname):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/network.py", line 1189, in networkInitialize
    devnames = dumpMissingDefaultIfcfgs()
  File "/sbin/anaconda", line 1068, in <module>
    networkInitialize(ksdata)
ValueError: No closing quotation

Additional info:
cmdline:        /usr/bin/python  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   initrd=initrd0.img root=live:UUID=967B-5310 rootfstype=vfat rw rd.live.image overlay=UUID=967B-5310 quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0  BOOT_IMAGE=vmlinuz0 
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         3.11.10-301.fc20.x86_64
other involved packages: python-libs-2.7.5-9.fc20.x86_64
product:        Fedora
release:        Fedora release 20 (Heisenbug)
type:           anaconda
version:        20

Comment 1 Justin Paupore 2013-12-21 08:06:50 UTC
Created attachment 839938 [details]
File: anaconda-tb

Comment 2 Justin Paupore 2013-12-21 08:06:51 UTC
Created attachment 839939 [details]
File: anaconda.log

Comment 3 Justin Paupore 2013-12-21 08:06:53 UTC
Created attachment 839940 [details]
File: environ

Comment 4 Justin Paupore 2013-12-21 08:06:54 UTC
Created attachment 839941 [details]
File: journalctl

Comment 5 Justin Paupore 2013-12-21 08:06:56 UTC
Created attachment 839942 [details]
File: lsblk_output

Comment 6 Justin Paupore 2013-12-21 08:06:57 UTC
Created attachment 839943 [details]
File: nmcli_dev_list

Comment 7 Justin Paupore 2013-12-21 08:06:59 UTC
Created attachment 839944 [details]
File: os_info

Comment 8 Justin Paupore 2013-12-21 08:07:00 UTC
Created attachment 839945 [details]
File: program.log

Comment 9 Justin Paupore 2013-12-21 08:07:02 UTC
Created attachment 839946 [details]
File: storage.log

Comment 10 Justin Paupore 2013-12-21 08:07:04 UTC
Created attachment 839947 [details]
File: ifcfg.log

Comment 11 Fedora Update System 2014-10-20 18:58:05 UTC
anaconda-21.48.11-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/anaconda-21.48.11-1.fc21

Comment 12 Fedora Update System 2014-10-21 17:25:55 UTC
Package anaconda-21.48.11-1.fc21, python-blivet-0.61.6-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-21.48.11-1.fc21 python-blivet-0.61.6-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-13413/python-blivet-0.61.6-1.fc21,anaconda-21.48.11-1.fc21
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2014-10-23 14:15:06 UTC
anaconda-21.48.12-1.fc21, python-blivet-0.61.7-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/python-blivet-0.61.7-1.fc21,anaconda-21.48.12-1.fc21

Comment 14 Fedora End Of Life 2015-05-29 10:05:26 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.