Closed
Bug 1365499
Opened 8 years ago
Closed 8 years ago
Remove duplicated entries V4 in HashCompleter
Categories
(Toolkit :: Safe Browsing, enhancement, P2)
Toolkit
Safe Browsing
Tracking
()
RESOLVED
INVALID
People
(Reporter: tnguyen, Assigned: tnguyen)
Details
(Whiteboard: #sbv4-m7)
Attachments
(1 file)
1.43 KB,
patch
|
dimi
:
review-
|
Details | Diff | Splinter Review |
In V4, we should removed duplicated hash prefix entries in HashCompleter before propagating the hash prefixes to server.
One case that we may have duplicated entries is:
- in V4 we found 2 prefixes matches : ABABABAB and ABABABABEF, then decide to send only 4 bytes to server. Then the prefix and its noise will be duplicated
We did filter duplicated prefixes in V2 and should be do the same in V4
Assignee | ||
Comment 1•8 years ago
|
||
MozReview-Commit-ID: Fu6fJpVufJw
Assignee | ||
Updated•8 years ago
|
Attachment #8868419 -
Flags: review?(dlee)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → tnguyen
Assignee | ||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Updated•8 years ago
|
Priority: -- → P2
Whiteboard: #sbv4-m7
Comment 2•8 years ago
|
||
Comment on attachment 8868419 [details] [diff] [review]
Remove duplicated entries V4 in HashCompleter
Review of attachment 8868419 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js
@@ +471,5 @@
>
> // Build the "distinct" prefix array.
> let prefixSet = new Set();
> + this._requests.forEach(r => {
> + let encodedParitalHash = btoa(r.partialHash);
typo: "Parital"
Comment 3•8 years ago
|
||
Comment on attachment 8868419 [details] [diff] [review]
Remove duplicated entries V4 in HashCompleter
Review of attachment 8868419 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js
@@ +476,5 @@
> + // Do not need to propagate duplicated prefixes to server
> + if (!prefixSet.has(encodedParitalHash)) {
> + prefixSet.add(encodedParitalHash);
> + }
> + });
I found this is not necessary because prefixSet is already a "Set"
Attachment #8868419 -
Flags: review?(dlee) → review-
Assignee | ||
Comment 4•8 years ago
|
||
You are right, thanks you Dimi. Closed this.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•