[libsoup] Make QUERY_ALL explicit in SoupCookieJarSQLite



commit 576e9e8a658b33ea0163d703745adf366f6c9c0e
Author: Alexander Sack <asac ubuntu com>
Date:   Fri Oct 2 10:28:59 2009 +0300

    Make QUERY_ALL explicit in SoupCookieJarSQLite
    
    SELECT * is dangerous, as there seems to be at least two different
    formats with different orders in the wild.
    
    Bug #596859
    
    Signed-off-by: Xan Lopez <xan gnome org>

 libsoup/soup-cookie-jar-sqlite.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-cookie-jar-sqlite.c b/libsoup/soup-cookie-jar-sqlite.c
index b7bb579..f782cb3 100644
--- a/libsoup/soup-cookie-jar-sqlite.c
+++ b/libsoup/soup-cookie-jar-sqlite.c
@@ -168,7 +168,7 @@ soup_cookie_jar_sqlite_new (const char *filename, gboolean read_only)
 			     NULL);
 }
 
-#define QUERY_ALL "SELECT * FROM moz_cookies;"
+#define QUERY_ALL "SELECT id, name, value, host, path, expiry, lastAccessed, isSecure, isHttpOnly FROM moz_cookies;"
 #define CREATE_TABLE "CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, name TEXT, value TEXT, host TEXT, path TEXT,expiry INTEGER, lastAccessed INTEGER, isSecure INTEGER, isHttpOnly INTEGER)"
 #define QUERY_INSERT "INSERT INTO moz_cookies VALUES(NULL, %Q, %Q, %Q, %Q, %d, NULL, %d, %d);"
 #define QUERY_DELETE "DELETE FROM moz_cookies WHERE name=%Q AND host=%Q;"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]