[glib: 7/11] gio/tests: unescape the nonce_file value
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 7/11] gio/tests: unescape the nonce_file value
- Date: Wed, 18 May 2022 14:01:44 +0000 (UTC)
commit 78862837507f5929cffb7680bb66b9c1a2954a70
Author: Marc-André Lureau <marcandre lureau redhat com>
Date: Sun May 15 16:54:25 2022 +0200
gio/tests: unescape the nonce_file value
The raw value is escaped according to D-Bus rules. This is probablematic
for Windows backslashed paths. We can use URI unescaping, it seems
that's what gdbusaddress.c is doing too.
Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>
gio/tests/gdbus-peer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index 7ca8bb7157..8df78af1dc 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -1724,7 +1724,7 @@ test_nonce_tcp (void)
s = strstr (address, "noncefile=");
g_assert (s != NULL);
s += sizeof "noncefile=" - 1;
- nonce_file = g_strdup (s);
+ nonce_file = g_uri_unescape_string (s, NULL); /* URI-unescaping should be good enough */
/* First try invalid data in the nonce file - this will actually
* make the client send this and the server will reject it. The way
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]