tracker r2473 - in trunk: . src/tracker-indexer
- From: carlosg svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2473 - in trunk: . src/tracker-indexer
- Date: Fri, 7 Nov 2008 13:00:21 +0000 (UTC)
Author: carlosg
Date: Fri Nov 7 13:00:21 2008
New Revision: 2473
URL: http://svn.gnome.org/viewvc/tracker?rev=2473&view=rev
Log:
2008-11-07 Carlos Garnacho <carlos imendio com>
* src/tracker-indexer/tracker-indexer-db.c (tracker_db_set_metadata):
Escape the value being inserted, so little Bobby Tables doesn't bite
us in the ass.
Modified:
trunk/ChangeLog
trunk/src/tracker-indexer/tracker-indexer-db.c
Modified: trunk/src/tracker-indexer/tracker-indexer-db.c
==============================================================================
--- trunk/src/tracker-indexer/tracker-indexer-db.c (original)
+++ trunk/src/tracker-indexer/tracker-indexer-db.c Fri Nov 7 13:00:21 2008
@@ -734,11 +734,16 @@
metadata_key = tracker_ontology_service_get_key_metadata (tracker_service_get_name (service),
tracker_field_get_name (field));
if (metadata_key > 0) {
+ gchar *escaped_str;
+
+ escaped_str = tracker_escape_string (value);
+
tracker_db_interface_execute_query (iface, NULL,
"update Services set KeyMetadata%d = '%s' where id = %d",
metadata_key,
- value,
+ escaped_str,
id);
+ g_free (escaped_str);
}
g_free (id_str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]