#845166 nm-applet: SSID is parsed as markup on connect (special treatment of &, <, ...)

Package:
network-manager-gnome
Source:
network-manager-applet
Description:
network management framework (GNOME frontend)
Submitter:
Domen Puncer Kugler
Date:
2022-03-21 02:51:02 UTC
Severity:
normal
#845166#5
Date:
2016-11-21 00:34:51 UTC
From:
To:
Dear Maintainer,

Reproduction steps:
1. Run nm-applet from terminal.
2. Set up wifi AP with SSID that contains "&".
3. Connect to that wifi AP.
In terminal you will see error like:
(nm-applet:3753): Gtk-WARNING **: Failed to set text from markup due to error
parsing markup: Error on line 1: Entity did not end with a semicolon; most
likely you used an ampersand character without intending to start an entity —
escape ampersand as &

Variation
If you have wifi such as "<b>foo", you'll get the following error:
(nm-applet:3753): Gtk-WARNING **: Failed to set text from markup due to error
parsing markup: Unknown tag 'script' on line 3 char 86


Seaching the internet suggests this has to do with Pango interpreting markup.
While my test cases are benign, it is worrying that some more complex could be
generated (e.g. including a hyperlink, image; or just triggering some parsing
bug).

As SSIDs do not contain markup, it should just not be interpreted as such.


I have not tested later versions. Updating only network-manager-gnome from
testing on "stable" seems to be impossible.

#845166#10
Date:
2022-03-21 02:24:51 UTC
From:
To:
I seem to see the same with ASCII spaces (0x20) in the SSID.

However I can create the connection using nmcli, and then selected it
from the GUI.

root@ideapc:~# pre network-m
network-manager	1.30.0-2		amd64
network-manager-gnome	1.20.0-3		amd64
root@ideapc:~# cat /etc/debian_version
11.2
root@ideapc:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye
root@ideapc:~#