Closed Bug 1365499 Opened 8 years ago Closed 8 years ago

Remove duplicated entries V4 in HashCompleter

Categories

(Toolkit :: Safe Browsing, enhancement, P2)

enhancement

Tracking

()

RESOLVED INVALID

People

(Reporter: tnguyen, Assigned: tnguyen)

Details

(Whiteboard: #sbv4-m7)

Attachments

(1 file)

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
MozReview-Commit-ID: Fu6fJpVufJw
Attachment #8868419 - Flags: review?(dlee)
Assignee: nobody → tnguyen
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: #sbv4-m7
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 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-
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.

Attachment

General

Created:
Updated:
Size: