mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
gdbus: Escape nonce files in dbus addressess
Otherwise the colon in c:\blah made for trouble
This commit is contained in:
parent
2414d7d6a1
commit
82aecce301
@ -843,6 +843,7 @@ try_tcp (GDBusServer *server,
|
||||
guint n;
|
||||
gsize bytes_written;
|
||||
gsize bytes_remaining;
|
||||
char *file_escaped;
|
||||
|
||||
server->nonce = g_new0 (guchar, 16);
|
||||
for (n = 0; n < 16; n++)
|
||||
@ -878,10 +879,12 @@ try_tcp (GDBusServer *server,
|
||||
bytes_remaining -= ret;
|
||||
}
|
||||
close (fd);
|
||||
file_escaped = g_uri_escape_string (server->nonce_file, "/\\", FALSE);
|
||||
server->client_address = g_strdup_printf ("nonce-tcp:host=%s,port=%d,noncefile=%s",
|
||||
host,
|
||||
port_num,
|
||||
server->nonce_file);
|
||||
file_escaped);
|
||||
g_free (file_escaped);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user