Commit graph

56 commits

Author SHA1 Message Date
Henry Chang
ed11934666 Bug 1392204 - Disable goog-badbinurl-proto and goog-downloadwhite-proto on Fennec. r=francois
Version 4 of the Google Safe Browsing server will return a 404 if any of the
application reputation lists are requested on Android. As a result, we should
avoid these threat types from being sent along with ANDROID_PLATFORM.

MozReview-Commit-ID: 6TUBVxe455y

--HG--
extra : rebase_source : dee095c008f4d328f359c66d20f0cc2dfcd109f3
extra : source : 5d6338807c6b21b7672236cac01b13bd75155225
2017-08-22 12:20:57 +08:00
Francois Marier
adc9339128 Bug 1385484 - Add the login reputation whitelist behind a pref. r=hchang
MozReview-Commit-ID: Dbtl3WL5tMJ

--HG--
extra : rebase_source : d56e3db985865d0b513184d8ad41e2b750e7733e
2017-08-08 16:23:10 -07:00
Francois Marier
6fcbb94e82 Bug 1385484 - Cleanup Safe Browsing prefs and sync the download protection setting. r=hchang
MozReview-Commit-ID: B42p2Gw8y9i

--HG--
extra : rebase_source : ecc00c8251814783bbe5e9ea911ad034a9a3a9b0
2017-08-08 15:52:29 -07:00
Wes Kocher
207dd28c61 Backed out 4 changesets (bug 1385484) for build failures a=backout
Backed out changeset 401c2744f16b (bug 1385484)
Backed out changeset 2ff443a0c744 (bug 1385484)
Backed out changeset 1a1c476a9aaa (bug 1385484)
Backed out changeset 87ec064a3681 (bug 1385484)

MozReview-Commit-ID: D9WGXiXaNoZ

--HG--
extra : rebase_source : ebab6135905e972abf7eeab9af8db41454687373
2017-08-22 17:22:41 -07:00
Francois Marier
542d943dc4 Bug 1385484 - Add the login reputation whitelist behind a pref. r=hchang
MozReview-Commit-ID: Dbtl3WL5tMJ

--HG--
extra : rebase_source : 8f163e6871559a36e02b2c576970b4f1624da3b4
2017-08-08 16:23:10 -07:00
Francois Marier
7a9673e542 Bug 1385484 - Cleanup Safe Browsing prefs and sync the download protection setting. r=hchang
MozReview-Commit-ID: B42p2Gw8y9i

--HG--
extra : rebase_source : ecc00c8251814783bbe5e9ea911ad034a9a3a9b0
2017-08-08 15:52:29 -07:00
Nicholas Nethercote
8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Henry Chang
4950f839d2 Bug 1388582 - Skip unsupported threat types on current platform while making v4 request. r=francois
MozReview-Commit-ID: FTmOMQ339ZL

--HG--
extra : rebase_source : ea41ae42dc2faa9bab040018b4ee3a1ade49ed69
2017-08-16 15:30:20 +08:00
Nicholas Nethercote
025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Henry Chang
af3b11c151 Bug 1375277 - New safebrowsing threat type "POTENTIALLY_HARMFUL_APPLICATION" introduced by v4. r=francois
As our threattype-listname conversion design, "goog-harmful-proto" is allocated
for this new threat type. This threat type is mainly for mobile.

MozReview-Commit-ID: G9GbgmHHHfp

--HG--
extra : rebase_source : 0681fcd9322b94451a86eafe57bf1ccc4b89db30
extra : intermediate-source : 28b0502d9add81beeae58a2c33f9fd5839d4d544
extra : source : 646f02f15131aa98ad37015b0a641304a3271796
2017-07-27 15:37:57 +08:00
Masatoshi Kimura
f143125cc2 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G

--HG--
extra : rebase_source : e8c9eb03468c075b79013b6e0bd8b367229c24cd
2017-07-29 20:50:21 +09:00
Sylvestre Ledru
7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Nathan Froyd
a7e99ae521 Bug 1378387 - use dependent strings in the url-classifier where possible; r=gcp
Doing this makes various operations more efficient, as we don't have to
allocate, copy strings, and deallocate needlessly.  The remaining
instances of nsCString temporaries are in logging code, which didn't
seem worthwhile to deal with here.
2017-07-06 15:26:12 -04:00
Francois Marier
9f3d9fa798 Bug 1376024 - Whitelist more known Safe Browsing providers for telemetry purposes. r=dimi
MozReview-Commit-ID: 6Dd1eDSJlzT

--HG--
extra : rebase_source : 3ffc44da6676e5cac993d7bdab12c821e995f1ca
2017-06-23 17:00:45 -07:00
Francois Marier
6d8aa577bc Bug 1362501 - Use LINUX_PLATFORM for Safe Browsing on non-Windows and non-OSX platforms. r=gcp
MozReview-Commit-ID: 58059M8IhL

--HG--
extra : rebase_source : 605969481758e175c078dbd48083467649bdf1a2
2017-05-05 11:38:38 -07:00
DimiL
c18e9c758a Bug 1357207 - Caching duration recorded to telemetry should be milli-second . r=francois
In Bug 1311935, We change positive/negative cache duration from milli-second to second.
But the value doesn't covert back to milli-second when store to telemetry(telemetry use
milli-second).

MozReview-Commit-ID: KR6xn9pwhUd

--HG--
extra : rebase_source : 378149dc29d61cbca31b8aa913df946ceff556f3
2017-04-18 12:01:09 +08:00
dimi
127351f6ef Bug 1311935 - P2. Process fullHashes.find response. r=francois
This patch includes following changes:

1. nsUrlClassifierHashCompleter.js
   nsUrlClassifierHashCompleter.idl
   - Add completionV4 interface for hashCompleter to pass response data to
     DB service.
   - Process response data includes negative cache duration, matched full
     hashes and cache duration for each match. Full matches are passed through
     nsIFullHashMatch interface.
   - Change _requests.responses from array contains matched fullhashes to
     dictionary so that it can store additional information likes negative cache
     duration.
2. nsUrlClassifierDBService.cpp
   - Implement CompletionV4 interface, store response data to CacheResultV4
     object. Expired duration to expired time is handled here.
   - Add CacheResultToTableUpdate function to convert V2 & V4 cache result
     to TableUpdate object.
3. LookupCache.h
   - Extend CacheResult to CacheResultV2 and CacheResultV4 so we can store
     response data in CompletionV2 and CompletionV4.
4. HashStore.h
   - Add API and member variable in TableUpdateV4 to store response data.
     TableUpdate object is used by DB service to pass update data or gethash
     response to Classifier, so we need to extend TableUpdateV4 to be able
     to store fullHashes.find response.
6. Entry.h
   - Define the structure about how we cache fullHashes.find response.

MozReview-Commit-ID: FV4yAl2SAc6

--HG--
extra : rebase_source : 02676ded9bc0580c24b4c906199a4abaf004e296
2017-04-11 11:50:48 +08:00
Iris Hsiao
3d85c0330d Backed out 4 changesets (bug 1311935) for causing assertion crash by developer's request
Backed out changeset 27e624cd9479 (bug 1311935)
Backed out changeset 4c0381ab0990 (bug 1311935)
Backed out changeset 73587838ef16 (bug 1311935)
Backed out changeset a5a6c0f79733 (bug 1311935)
2017-04-11 11:04:54 +08:00
dimi
5112db082c Bug 1311935 - P2. Process fullHashes.find response. r=francois
This patch includes following changes:

1. nsUrlClassifierHashCompleter.js
   nsUrlClassifierHashCompleter.idl
   - Add completionV4 interface for hashCompleter to pass response data to
     DB service.
   - Process response data includes negative cache duration, matched full
     hashes and cache duration for each match. Full matches are passed through
     nsIFullHashMatch interface.
   - Change _requests.responses from array contains matched fullhashes to
     dictionary so that it can store additional information likes negative cache
     duration.
2. nsUrlClassifierDBService.cpp
   - Implement CompletionV4 interface, store response data to CacheResultV4
     object. Expired duration to expired time is handled here.
   - Add CacheResultToTableUpdate function to convert V2 & V4 cache result
     to TableUpdate object.
3. LookupCache.h
   - Extend CacheResult to CacheResultV2 and CacheResultV4 so we can store
     response data in CompletionV2 and CompletionV4.
4. HashStore.h
   - Add API and member variable in TableUpdateV4 to store response data.
     TableUpdate object is used by DB service to pass update data or gethash
     response to Classifier, so we need to extend TableUpdateV4 to be able
     to store fullHashes.find response.
6. Entry.h
   - Define the structure about how we cache fullHashes.find response.

MozReview-Commit-ID: KgR1NASl7GC

--HG--
extra : rebase_source : 424db14e4af2ffd691c384414d50f64083d5d20b
2017-04-10 16:20:09 +08:00
Thomas Nguyen
41511788f2 Bug 1331139 - Enable download protection for V4 lists. r=francois
MozReview-Commit-ID: 8IHKGvXQjPt

--HG--
extra : rebase_source : da86fa38df68be976f482e2a4033b2e668e97850
2017-02-27 12:18:33 +08:00
dimi
154a17d29f Bug 1338082 - Add telemetry probes to track the positive and negative cache durations in V4. r=francois
MozReview-Commit-ID: 43Nf5bS2Uo

--HG--
extra : rebase_source : 909db55a9421c2fe55d29c10070bd4e104fd0692
2017-02-20 10:25:18 +08:00
Nathan Froyd
27c2477d25 Bug 1339556 - remove nsUrlClassifierUtils::Charmap; r=gcp
The current code doesn't use Charmap.
2017-02-15 09:29:42 -05:00
Thomas Nguyen
fdfc58a406 Bug 1329558 - Implement Minimum wait duration for V4 gethash r=francois
MozReview-Commit-ID: 7i9Wz7pq0yJ

--HG--
extra : rebase_source : a02c2e3cbd5f535192f5dbaadabce16abd6bb35f
2017-02-09 16:56:44 +08:00
DimiL
46e51631a9 Bug 1331881 - Minimum wait duration and negative cache duration should be passed even if there is no match. r=francois,henry
MozReview-Commit-ID: K5RcpmiXFYR

--HG--
extra : rebase_source : 7d9c48c658fc04b0430965e93476063d3cff4a7f
2017-01-18 17:34:03 +08:00
Dimi Lee
9907b239c2 Bug 1332770 - Fix the google4 provider is showing up as other in some telemetry pings. r=francois
MozReview-Commit-ID: KbpYAnf6qxd

--HG--
extra : rebase_source : fe524ca5afbd1b8b08b80198eeb43db5f84f677e
2017-01-27 18:02:36 +08:00
Henry Chang
758d80f10b Bug 1276826 - Part 2. Send gethash request and handle gethash response for v4. r=francois
MozReview-Commit-ID: 6fIbN6a6gHI

--HG--
extra : rebase_source : d64a2b4f85b24aac0a847a46748b3b3fdf0db749
extra : intermediate-source : c486204319c1afc158b871bad7edd2f7a565022a
extra : source : adf76dccec9d51df0d3a659ffa3dd201d8115bc4
2016-11-28 14:55:36 +08:00
Henry Chang
156d495c02 Bug 1276826 - Part 1. Implement function to build FindFullHash request for v4. r=francois
MozReview-Commit-ID: 6hi97T9Jk7s

--HG--
extra : rebase_source : 88230951465e3efc94c2d2efa6d28540e7937c09
2016-11-28 14:54:49 +08:00
Thomas Nguyen
bb51dce698 Bug 1315893 - Add telemetry to measure update time for V2 and V4. r=francois
MozReview-Commit-ID: KtrVJXHXMo

--HG--
extra : rebase_source : 6aa4d0fd01afd24e9e45f55a5d45da255962ca92
2016-11-24 11:13:54 +08:00
Henry Chang
1a53231595 Bug 1315097 - Build the provider dictionary on the main thread to be used everywhere. r=francois,gcp
MozReview-Commit-ID: Ft1deSNKuVB

--HG--
extra : rebase_source : 0cf746b1d2def35606f012c994ddbda0857ccf2d
2016-11-04 17:54:05 +08:00
Henry Chang
b468335de9 Bug 1285848 - Part 2: Request and parse RICE encoded prefix by default. r=francois
MozReview-Commit-ID: Cd0lT5VTM7t

--HG--
extra : rebase_source : 08724d3c8039039b8c73f58230b1cdad94ccd786
extra : source : 3abd3bc8a0119433ef66864c8c7fd1394fb0cc14
2016-10-05 14:59:53 +08:00
Henry
783b510c3c Bug 1305567 - Use base64url encoding and avoid cutting the state. r=francois
--HG--
extra : rebase_source : 0811176b1337ffcb3d144776f9892857868f87dd
2016-09-30 10:36:40 -07:00
Sebastian Hengst
80e1cc8c7a Backed out changeset d46155cc719e (bug 1305567) for various failures in browser-chrome, devtools, and xpcshell (e.g. test_streamupdater.js) tests. r=backout on a CLOSED TREE 2016-09-29 20:54:50 +02:00
Henry
be4eff5cee Bug 1305567 - Use base64url encoding, avoid cutting the state and dump download error message. r=francois.
MozReview-Commit-ID: 1umDhxY5eKl

--HG--
extra : rebase_source : 89dfc9852dc9010afb99d6365b95780c4cce767b
2016-09-27 11:48:11 -07:00
Henry Chang
8cc38b3dfc Bug 1302044 - Init tableArray with only enabled tables. r=francois.
MozReview-Commit-ID: KMp8oLkBXwb

--HG--
extra : rebase_source : eb29994750e8707c18867a6f9fa6ac9e00dd49ff
2016-09-12 17:30:06 +08:00
Henry Chang
b3b4096aa2 Bug 1301008 - Pass safebrowsing v4 list state in base64 format to avoid truncation. r=francois
MozReview-Commit-ID: 6oVdQvEoMm2

--HG--
extra : rebase_source : c239f5682213ec6e4e197d8aa7d267342dcd08f8
2016-09-07 17:45:15 +08:00
Henry
db1a9a2ec6 Bug 1287059 - Part 1: Return all possible list names while converting from threat type. r=francois.
MozReview-Commit-ID: KgT4CrBzvu0

--HG--
extra : rebase_source : 6067f296fd820c6948bb418bf67371b56326338a
2016-08-16 17:30:11 +08:00
Igor
175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor
a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
Henry Chang
019c6a51fd Bug 1274112 - Part 1: Make update request v4. r=francois
MozReview-Commit-ID: NgV4QYbDll

--HG--
extra : rebase_source : 0c6c000e81e73617c6616dfa39fa868e35a43f9c
2016-08-04 18:10:06 +08:00
Igor
4efade90d4 Bug 1197331 - remove PR_snprintf calls in miscellaneous directories. r=nfroyd
--HG--
extra : rebase_source : a19f77db06e68bd3d69faf56b8bbdc1825f13249
2016-08-04 16:41:00 +02:00
Henry Chang
b4c6cfd89b Bug 1288840 - Use the private phishing site list in official build. r=francois
MozReview-Commit-ID: 3SYoP2z1jWb

--HG--
extra : rebase_source : 3db67147f6fc4ae0533636b9ce2b12c579302005
2016-07-25 09:18:25 +08:00
Jan Beich
2b3d43549c Bug 1288825 - Unbreak build on Unix after bug 1275507. r=francois
MozReview-Commit-ID: nYNiYjuq8A

--HG--
extra : rebase_source : 2f433895b15920263fbfa5c4b2a30f4097434d07
2016-07-22 20:48:26 +00:00
Henry Chang
5efab66305 Bug 1275507 - XPCOM API to create SB v4 update request. r=francois
MozReview-Commit-ID: RfM3KFe6kG

--HG--
extra : rebase_source : b208a6b83953b21db7bf1a857453d55fa9ab1c87
2016-07-19 18:09:53 +08:00
Nicholas Nethercote
4dc9849b87 Bug 1278439 - Adding a missing prefs service null check in url-classifier/. r=gcp.
--HG--
extra : rebase_source : 2f678d52978bfdc9533a67932133af3794cec171
2016-07-14 13:47:54 +10:00
Henry Chang
e8b9de22ac Bug 1273395 - Add pref for Safe Browsing v2/v4 switch. r=francois. 2016-05-19 00:07:00 +02:00
Dragana Damjanovic
7987d2203e Bug 905127 - Part 2 - remove unnecessary nsNetUtil.h includes r=jduell 2015-07-06 07:55:00 +02:00
Birunthan Mohanathas
5f1fde8824 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Gian-Carlo Pascutto
2f0246c854 Bug 783047 - Remove MAC support from SafeBrowsing code. r=mmc,dcamp 2014-01-16 09:27:58 +01:00
Trevor Saunders
000b6e89a1 bug 798595 - remove useless prmem.h includes r=ehsan 2012-10-04 02:14:06 -04:00
Randell Jesup
65539ef89c Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04:00