[tracker/wip/carlosg/statement-fixes: 4/7] libtracker-sparql: Escape query in remote connection
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/statement-fixes: 4/7] libtracker-sparql: Escape query in remote connection
- Date: Sat, 13 Nov 2021 12:08:03 +0000 (UTC)
commit 948afc8e4b5a083c18b4895c4e3c29304943d253
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Nov 10 23:16:37 2021 +0200
libtracker-sparql: Escape query in remote connection
This is embedded in the URI, so should get proper escaping to avoid
misinterpretation with certain characters.
src/libtracker-sparql/remote/tracker-remote.vala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-sparql/remote/tracker-remote.vala
b/src/libtracker-sparql/remote/tracker-remote.vala
index 50dc612f3..252d70a40 100644
--- a/src/libtracker-sparql/remote/tracker-remote.vala
+++ b/src/libtracker-sparql/remote/tracker-remote.vala
@@ -37,7 +37,7 @@ public class Tracker.Remote.Connection : Tracker.Sparql.Connection {
}
private Soup.Message create_request (string sparql) {
- var uri = _base_uri + "?query=" + sparql;
+ var uri = _base_uri + "?query=" + GLib.Uri.escape_string (sparql, null, false);
var message = new Soup.Message ("GET", uri);
#if SOUP2
var headers = message.request_headers;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]