Bug#970579: libvte-2.91-0: OSC 7 does not work with hostname starting with a digit
Simon McVittie
smcv at debian.org
Sat Sep 19 12:08:11 BST 2020
Control: retitle -1 libvte-2.91-0: OSC 7 does not work with hostname starting with a digit
Control: reassign -1 libglib2.0-0
Control: affects -1 + libvte-2.91-0
On Sat, 19 Sep 2020 at 10:13:26 +0200, Tobias Bengfort wrote:
> I temporarily changed my hostname from "2902toc" to "test" and it also
> worked. So maybe libvte doesn't like my hostname?
This appears to be because libvte-2.91-0 uses g_filename_from_uri() to
convert the argument of the VTECWD sequence into a filename, and that
function does not allow hostnames that start with a digit:
$ python3
>>> from gi.repository import GLib
>>> GLib.filename_from_uri('file:///etc')
('/etc', hostname=None)
>>> GLib.filename_from_uri('file://two902toc/etc')
('/etc', hostname='two902toc')
>>> GLib.filename_from_uri('file://2902toc/etc')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
gi.repository.GLib.Error: g_convert_error: The hostname of the URI “file://2902toc/etc” is invalid (4)
Specifically, hostname_validate() checks that the first character of
the hostname is a letter. As per RFC 1123 it should probably allow
either a letter or a digit in that position.
As a practical matter, I would suggest choosing hostnames that do not
start with digits if possible, because this is likely to be far from
the only bug involving hostnames starting with digits.
smcv
More information about the pkg-gnome-maintainers
mailing list