From 03d6200a7e9f7e9fd353a359e80d26d89889f97d Mon Sep 17 00:00:00 2001 From: "dietrich%mozilla.com" Date: Fri, 7 Mar 2008 18:53:04 +0000 Subject: [PATCH] Bug 419642 ? WARNING: Unsafe use of LIKE detected! (for ondrej@allpeers.com, r=dietrich) --- toolkit/components/places/src/nsNavHistory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolkit/components/places/src/nsNavHistory.cpp b/toolkit/components/places/src/nsNavHistory.cpp index db83cb0a46e..ca4dbc3a5e9 100644 --- a/toolkit/components/places/src/nsNavHistory.cpp +++ b/toolkit/components/places/src/nsNavHistory.cpp @@ -3064,7 +3064,7 @@ PlacesSQLQueryBuilder::SelectAsSite() "WHERE EXISTS(SELECT '*' " "FROM moz_places " "WHERE hidden <> 1 AND rev_host = '.' " - "AND url LIKE 'file://%%') " + "AND url BETWEEN 'file://' AND 'file:/~') " "UNION ALL " "SELECT DISTINCT null, " "'place:type=%ld&sort=%ld&domain='||host||'&domainIsHost=true', " @@ -3092,7 +3092,7 @@ PlacesSQLQueryBuilder::SelectAsSite() "FROM moz_places h " "JOIN moz_historyvisits v ON h.id = v.place_id " "WHERE h.hidden <> 1 AND h.rev_host = '.' " - "AND h.url LIKE 'file://%%' " + "AND h.url BETWEEN 'file://' AND 'file:/~' " "AND v.visit_type NOT IN (0,4) {ADDITIONAL_CONDITIONS} ) " "UNION ALL " "SELECT DISTINCT null, "