[tracker/wip/carlosg/iri-escape-fix] libtracker-sparql: Add missing character to IRI escape check
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/iri-escape-fix] libtracker-sparql: Add missing character to IRI escape check
- Date: Mon, 19 Sep 2022 12:09:25 +0000 (UTC)
commit cfbcfa116ab4fb63877fe4b6c6205b0880b7a9ba
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Sep 19 13:27:39 2022 +0200
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.
src/libtracker-sparql/tracker-resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]