Commit Graph

1128 Commits

Author SHA1 Message Date
Andrea Marchesini
715c7ec659 Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-17 20:38:05 +02:00
Andrea Marchesini
47c73656be Bug 1409329 - NS_NewBufferedOutputStream should take the ownership of the outputStream, r=smaug 2017-10-17 20:38:05 +02:00
Kris Maglione
60872d7b31 Bug 1404198: Part 2f - Switch to NS_NewTimer* in toolkit. r=njn
MozReview-Commit-ID: 185rZ99R6zV
2017-10-15 23:14:00 -07:00
Dan Banner
5af4450327 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
DimiL
86a5503774 Bug 1384405 - Dump request payload for V2 400 responses. r=francois
Refactor SafeBrowsing code so we can get the payload of gethash/update request when
updates fail.

MozReview-Commit-ID: NB1oacd185
2017-10-05 08:37:29 +08:00
Thomas Nguyen
141b95e424 Bug 1389315 - Isolate Safe Browsing completions cached by each provider. r=francois
MozReview-Commit-ID: INiuM5ydv2f
2017-09-14 17:05:52 +08:00
Thomas Nguyen
f6a10d5488 Bug 1403473 - Init loggingEnable for hashcompleter r=dimi
MozReview-Commit-ID: 1BpErwmbgCM
2017-09-27 16:49:02 +08:00
Thomas Nguyen
da894bb42f Bug 1351147 - Support ThreatHit requests in SafeBrowsing V4 r=francois
MozReview-Commit-ID: 3ifQtdOTulE
2017-08-24 11:13:12 +08:00
Thomas Nguyen
4c384705a8 Bug 1351147 - Use fullhash instead of prefix in OnClassifyComplete r=francois
In order to optionally report the full hash back to Google, we need to keep it
around in the callback. While a prefix is not the same as a full hash (multiple
full hashes can map to the same prefix), in this case, the callback will only be
called when the full hash matches.

MozReview-Commit-ID: F4WSLZpYrXB
2017-08-04 18:20:13 +08:00
Thomas Nguyen
56106b45fc Bug 1351147 - Update protobuf to support threatHit api r=francois
MozReview-Commit-ID: IzjnWnNupvH
2017-08-04 15:50:18 +08:00
Thomas Nguyen
cf69fcf897 Bug 1401066 - Add poison canary to check for errors. r=francois
MozReview-Commit-ID: GpTDMR5Ni3e
2017-09-25 10:57:20 +08:00
Chris Peterson
11b00c1394 Bug 870698 - Part 5: Replace Assign(NS_LITERAL_CSTRING("")) with AssignLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: KXJM13VRTB7
2017-09-06 01:35:56 -07:00
Chris Peterson
ce551e51b9 Bug 870698 - Part 4: Replace Equals("") with EqualsLiteral(""). r=erahm
MozReview-Commit-ID: G1GhyvD29WK
2017-09-06 01:13:45 -07:00
Chris Peterson
6137e4ff8b Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm
MozReview-Commit-ID: CrkIP4iHP1U
2017-09-03 22:14:11 -07:00
Prathiksha
576a3dfdb1 Bug 1363051 - Update about:blocked page visuals and copy. r=francois,johannh
MozReview-Commit-ID: CK2cO5Ikivt
2017-09-04 19:25:05 +05:30
Thomas Nguyen
71a001d62e Bug 1394031 - Remove mCryptoHash members of nsUrlClassifierDBServiceWorker and ProtocolParser
The usage of cryptoHash consists of a complete set of Init, Update, and Finish, there's
no reason to keep it around

MozReview-Commit-ID: 7bT9IsWEM5m
2017-09-14 10:51:55 +08:00
Andrew McCreight
ed0e2f0913 Bug 1186409 - Use Cu.getGlobalForObject when importing properties off a JSM global. r=kmag
With JSM global sharing, the object returned by Cu.import() is a
NonSyntacticVariablesObject, rather than a global. Various code tries
to use properties from a JSM global via an import.

Cu.importGlobalProperties can also be used in some places.

MozReview-Commit-ID: HudCXO2GKN0
2017-06-23 13:51:14 -07:00
Thomas Nguyen
b2373700f4 Bug 1397231 - Skip new URLClassifierLocalChild when ContentChild is shutting down r=Ehsan
MozReview-Commit-ID: HRv5DpiPwmB
2017-09-07 16:16:43 +08:00
Thomas Nguyen
8496e0fafa Bug 1385609 - Fix backoff issue that makes SB lists no longer update r=francois
The issue occurs when nsITimer is fired earlier than the backoff time. In that
case, the update doesn't proceed and we never make another attempt because the
backoff update timer was oneshot.

We fix the issue in two ways:

- Add a tolerance of 1 second in case the timer fires too early.
- Set another oneshot timer whenever we are prevented from updating due to
backoff.

MozReview-Commit-ID: E2ogNRsHJVK
2017-08-30 18:04:10 +08:00
Sebastian Hengst
061e6ef724 Backed out changeset 14b4af261515 (bug 1385609) for eslint failures in nsUrlClassifierLib.js. r=backout 2017-09-05 19:04:43 +02:00
Thomas Nguyen
f699e980cb Bug 1395411 - Unregister tables when they're removed from urlclassifier.*Table. r=francois
MozReview-Commit-ID: Ex1ZxMcJLep
2017-08-31 18:46:23 +08:00
Thomas Nguyen
cf82b0fcf8 Bug 1385609 - Fix backoff issue that makes SB lists no longer update r=francois
The issue occurs when nsITimer is fired earlier than the backoff time. In that
case, the update doesn't proceed and we never make another attempt because the
backoff update timer was oneshot.

We fix the issue in two ways:

- Add a tolerance of 1 second in case the timer fires too early.
- Set another oneshot timer whenever we are prevented from updating due to
backoff.

MozReview-Commit-ID: E2ogNRsHJVK
2017-08-30 18:04:10 +08:00
Sebastian Hengst
f811dfefc1 Backed out changeset 7bb00f5e0120 (bug 1395411) for eslint failures in test_classifier_changetablepref_bug1395411.html: 'classifierHelper' is not defined. r=backout 2017-09-04 16:45:35 +02:00
Thomas Nguyen
b80ab7c3df Bug 1395411 - Unregister tables when they're removed from urlclassifier.*Table. r=francois
MozReview-Commit-ID: Ex1ZxMcJLep
2017-08-31 18:46:23 +08:00
Thomas Nguyen
25da99d8f4 Bug 1345058 - Asynchronously decide if a flash document should be blocked. r=baku
MozReview-Commit-ID: K91cSvIdOrb
2017-08-14 14:05:23 +08:00
Steve Armand
fb4c16351d Bug 1343843 - Remove unused chrome://global/content/url-classifier/unittests.xul. r=standard8
MozReview-Commit-ID: IMiDbyPu5n9
2017-09-01 23:31:57 -04:00
Francois Marier
76d985fb87 Bug 1395733 - Ensure the default value of urlclassifier.malwareTable is always sorted. r=gcp
MozReview-Commit-ID: 10M2ZpDyAI9
2017-08-31 14:54:11 -07:00
Francois Marier
cae69060c8 Bug 1394601 - Log an error when the Google API key is missing during Safe Browsing initialization. r=gcp
MozReview-Commit-ID: DNwa9lR0J6K
2017-08-28 17:06:00 -07:00
Eric Rahm
b3a9bd1c4c Bug 1393235 - Fix improper usages of string functions. r=njn
This fixes usages of `Find`, `RFind` and the equality operator that kind of
work right now but will break with the proper type checking of a templatized
version of the string classes.

For `Find` and `RFind` it appears that `nsCString::(R)Find("foo", 0)` calls
were being coerced to the `Find(char*, bool, int, int)` versions. The intent was
probably to just start searching from position zero.

For the equality operator, the type of nullptr is nullptr_t rather than
char(16_t)* so we'd need to add an operator overload that takes nullptr_t. In
this case just using `IsVoid` is probably more appropriate.
2017-08-22 19:30:46 -07:00
Francois Marier
042bbe0b38 Bug 1388574 - Use the correct pref to gate the Application Reputation lists. r=hchang
MozReview-Commit-ID: 1ZuxnbgsOMX
2017-08-23 13:40:50 -07:00
Thomas Nguyen
a014d3a744 Bug 1363038 - Remove synchronous dispatch when worker is racing against shutdown r=hchang
MozReview-Commit-ID: JOkOukz1fov
2017-08-22 14:51:44 +08:00
Henry Chang
0d7d639fec 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
2017-08-22 12:20:57 +08:00
Francois Marier
3fb9813b89 Bug 1385484 - Add the login reputation whitelist behind a pref. r=hchang
MozReview-Commit-ID: Dbtl3WL5tMJ
2017-08-08 16:23:10 -07:00
Francois Marier
366ae48b73 Bug 1385484 - Cleanup Safe Browsing prefs and sync the download protection setting. r=hchang
MozReview-Commit-ID: B42p2Gw8y9i
2017-08-08 15:52:29 -07:00
Wes Kocher
ee18e318e9 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
2017-08-22 17:22:41 -07:00
Francois Marier
b4f1a9b65e Bug 1385484 - Add the login reputation whitelist behind a pref. r=hchang
MozReview-Commit-ID: Dbtl3WL5tMJ
2017-08-08 16:23:10 -07:00
Francois Marier
0bdc6213e0 Bug 1385484 - Cleanup Safe Browsing prefs and sync the download protection setting. r=hchang
MozReview-Commit-ID: B42p2Gw8y9i
2017-08-08 15:52:29 -07:00
Nicholas Nethercote
42d8740878 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm. 2017-08-21 20:01:27 +10:00
Henry Chang
d022ca7e9b Bug 1388582 - Skip unsupported threat types on current platform while making v4 request. r=francois
MozReview-Commit-ID: FTmOMQ339ZL
2017-08-16 15:30:20 +08:00
Thomas Nguyen
a63544b5cb Bug 1376410 - Handle OOM when appending prefix to map r=francois,hchang
MozReview-Commit-ID: 7MOHHAgEI1I
2017-08-11 17:28:40 +08:00
Nicholas Nethercote
b7346a7502 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
Dan Banner
0d33a246ae Bug 1386684 - Enable ESLint for toolkit/components/url-classifier (manual fixes). r=hchang
MozReview-Commit-ID: JH1XDFMVd43
2017-08-02 20:09:14 +01:00
Dan Banner
1a5db31879 Bug 1386684 - Enable ESLint for toolkit/components/url-classifier (automatic fixes). r=hchang
MozReview-Commit-ID: F0Z8dRaYOku
2017-08-02 16:12:07 +01:00
Henry Chang
53064b6aa0 Bug 1375277 - Test case for new error code NS_ERROR_HARMFUL_URI. r=francois
The test is based on "test-harmful-simple" so we can add testing entries
in a human-readable way.

MozReview-Commit-ID: IJcYrp04uFs
2017-07-28 17:38:01 +08:00
Henry Chang
325a9e1bb5 Bug 1375277 - Move Safe Browsing UI events to a separate telemetry probe. r=francois
MozReview-Commit-ID: KDAklsznekw
2017-08-02 14:01:44 +08:00
Henry Chang
3ddce6c31d 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
2017-07-27 15:37:57 +08:00
Masatoshi Kimura
012500cff8 Bug 1375125 - Remove nsILocalFile. r=froydnj
MozReview-Commit-ID: 6oU6Ya5UXtC
2017-08-05 09:43:49 +09:00
Masatoshi Kimura
0af76969af Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC
2017-08-04 17:49:22 +09:00
Masatoshi Kimura
c0943e4f30 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G
2017-07-29 20:50:21 +09:00
Francois Marier
d33e0251eb Bug 1386013 - Log an error when Safe Browsing times out. r=hchang
MozReview-Commit-ID: A99ov9T7rtm
2017-07-31 20:29:25 -07:00