summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2022-09-19 13:27:39 +0200
committerCarlos Garnacho <carlosg@gnome.org>2022-09-19 13:27:39 +0200
commitcfbcfa116ab4fb63877fe4b6c6205b0880b7a9ba (patch)
tree9b35367572b4f57ff8b4edb9eb6eab29416721d5 /src
parent6e38fb55cb7cc58d8c29937db01dc8179fe15b68 (diff)
downloadtracker-cfbcfa116ab4fb63877fe4b6c6205b0880b7a9ba.tar.gz
libtracker-sparql: Add missing character to IRI escape check
The backslash character conversion is handled by the function, but not properly checked in the opt-out paths. This makes it fail to escape IRIs that only have \ as an invalid character.
Diffstat (limited to 'src')
-rw-r--r--src/libtracker-sparql/tracker-resource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libtracker-sparql/tracker-resource.c b/src/libtracker-sparql/tracker-resource.c
index 32975654e..6a6a9a3ed 100644
--- a/src/libtracker-sparql/tracker-resource.c
+++ b/src/libtracker-sparql/tracker-resource.c
@@ -103,7 +103,7 @@ escape_iri (const gchar *str)
/* Fast path, check whether there's no characters to escape */
if (!strpbrk (str,
- "<>\"{}|^`"
+ "<>\"{}|^`\\"
"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
"\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20")) {
return g_strdup (str);