Commit 900beefb authored by Mikael Ottela's avatar Mikael Ottela

Added missing sql escaping

svn path=/trunk/; revision=2851
parent e7a66021
2009-01-28 Mikael Ottela <mikael.ottela@ixonos.com>
* src/libtracker-data/tracker-rdf-query.c: Added a missing sql
escape.
Fixes NB #95227
2009-01-27 Mikael Ottela <mikael.ottela@ixonos.com>
* tests/tracker-extract/data/jpeg/create_jpeg_testdata
......
......@@ -725,11 +725,19 @@ start_element_handler (GMarkupParseContext *context,
static gchar *
get_value (const gchar *value, gboolean quote)
{
gchar *escaped;
gchar *ret;
escaped = tracker_escape_string(value);
if (quote) {
return g_strconcat (" '", value, "' ", NULL);
ret = g_strconcat (" '", escaped, "' ", NULL);
} else {
return g_strdup (value);
ret = g_strdup (escaped);
}
g_free (escaped);
return ret;
}
static gboolean
......@@ -1236,10 +1244,8 @@ tracker_rdf_query_to_sql (TrackerDBInterface *iface,
value = g_strdup (keywords[keyword]);
}
g_debug ("Adding key: %s Value:%s", key, value);
list = g_hash_table_lookup (table, key);
list = g_list_prepend (list, g_strdup (value));
list = g_list_prepend (list, tracker_escape_string(value));
g_hash_table_insert (table, g_strdup (key), list);
g_free (full);
......
......@@ -64,6 +64,10 @@ if HAVE_GSTREAMER
modules_LTLIBRARIES += libextract-gstreamer.la
endif
if HAVE_GSTREAMER
modules_LTLIBRARIES += libextract-gstreamer-tagreadbin.la
endif
if HAVE_GST_HELIX
modules_LTLIBRARIES += libextract-gstreamer-helix.la
endif
......@@ -171,6 +175,11 @@ libextract_gstreamer_la_SOURCES = tracker-extract-gstreamer.c $(albumart_sources
libextract_gstreamer_la_LDFLAGS = $(module_flags) $(albumart_flags)
libextract_gstreamer_la_LIBADD = $(albumart_libs) $(GSTREAMER_LIBS) $(GLIB2_LIBS)
# GStreamer tagreadbin
libextract_gstreamer_tagreadbin_la_SOURCES = tracker-extract-gstreamer-tagreadbin.c $(albumart_sources) $(escape_sources)
libextract_gstreamer_tagreadbin_la_LDFLAGS = $(module_flags) $(albumart_flags)
libextract_gstreamer_tagreadbin_la_LIBADD = $(albumart_libs) $(GSTREAMER_LIBS) $(GLIB2_LIBS)
# GStreamer helix
libextract_gstreamer_helix_la_SOURCES = tracker-extract-gstreamer-helix.c $(albumart_sources) $(escape_sources)
libextract_gstreamer_helix_la_LDFLAGS = $(module_flags) $(albumart_flags)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment