On a Tuesday in 2025, Michal Privoznik via Devel wrote:
From: Michal Privoznik <[email protected]>

According to [1] there are only few characters allowed in the
path to the daemon socket (alphanum and some punctuation;
notably, space is missing on the list). The rest must be escaped
by '%NN' notation. Fortunately, g_uri_escape_string() with some
carefully selected input values is able to escape the path.

Almost - it considers tilde valid but DBus doesn't. Well, let's
hope nobody has tilde in domain name.

https://www.rfc-editor.org/rfc/rfc3986.html#appendix-A
Well, g_uri_escape_string does what it says:
   unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"

Whether dbus is wrong or not, libvirt should escape the tilde too.

Jano


1: 
https://gitlab.freedesktop.org/dbus/dbus/-/blob/2dee5236088bcf690ba92b743a584720b8cb6f55/dbus/dbus-address.c#L332
Closes: https://gitlab.com/libvirt/libvirt/-/issues/834
Signed-off-by: Michal Privoznik <[email protected]>
---
src/qemu/qemu_dbus.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Attachment: signature.asc
Description: PGP signature

Reply via email to