evilsocket / opensnitch

OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch.
GNU General Public License v3.0
10.74k stars 498 forks source link

Fails to parse dopewars desktop file #260

Closed cyian-1756 closed 3 years ago

cyian-1756 commented 5 years ago

OS: Ubuntu 16.04

Trying to run opensnitch-ui on a Ubuntu 16.04 machine with the game dope wars installed crashes the program with a decoding error

File "/usr/local/bin/opensnitch-ui", line 40, in <module>
    service = UIService(app, on_exit, args.config)
  File "/usr/local/lib/python3.5/dist-packages/opensnitch/service.py", line 42, in __init__
    self._prompt_dialog = PromptDialog()
  File "/usr/local/lib/python3.5/dist-packages/opensnitch/dialogs/prompt.py", line 44, in __init__
    self._apps_parser = LinuxDesktopParser()
  File "/usr/local/lib/python3.5/dist-packages/opensnitch/desktop_parser.py", line 35, in __init__
    self._parse_desktop_file(desktop_file)
  File "/usr/local/lib/python3.5/dist-packages/opensnitch/desktop_parser.py", line 61, in _parse_desktop_file
    parser.read(desktop_path, 'utf8')
  File "/usr/lib/python3.5/configparser.py", line 696, in read
    self._read(fp, filename)
  File "/usr/lib/python3.5/configparser.py", line 1012, in _read
    for lineno, line in enumerate(fp, start=1):
  File "/usr/lib/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 136: invalid continuation byte

After I unistalled dope wars the program worked as expected

gustavo-iniguez-goya commented 3 years ago

This was fixed early this year. If it persists reopen the issue.