Closed Bug 1323953 Opened 8 years ago Closed 8 years ago

Always send a 4-byte prefix when doing V4 completions

Categories

(Toolkit :: Safe Browsing, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: hchang, Assigned: hchang)

References

Details

Attachments

(1 file)

Prior to v4, we already had 4 and 32 -byte prefix. However, while doing hash completion, we always send the first 4 bytes for the completion. [1] I tried to change this behavior by using the actual matched length. For example, if the prefix is 4 bytes, we send 4 bytes for completion; if the prefix is 7 bytes, we send 7 bytes for completion. I though the new behavior will not break anything but I got an xpcshell test error (test_partial.js). In addition to this test error, we may also have privacy issue when we send 32-byte prefix for completion. (Bug 1322532). Chance are we have to send something shorter than the prefix. This bug is to figure out how much of the prefix we should send for completion in each case. [1] https://dxr.mozilla.org/mozilla-central/rev/6dbc6e9f62a705d5f523cc750811bd01c8275ec6/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp#969
I will ask Google about this.
Assignee: nobody → francois
Blocks: 1276826
Status: NEW → ASSIGNED
Depends on: 1322523
Priority: -- → P2
Blocks: 1329808
No longer blocks: 1276826
Google says that we should be able to send a 4-byte prefix regardless of the length of the prefix that got matched, as long as we use the full prefix to decide whether or not we need to do the gethash call. Henry, if I understand you correctly, we currently only send 4-byte prefixes when doing completions in V4, right? This means we don't have to do anything and can just resolve this bug?
Flags: needinfo?(hchang)
(In reply to François Marier [:francois] from comment #2) > Google says that we should be able to send a 4-byte prefix regardless of the > length of the prefix that got matched, as long as we use the full prefix to > decide whether or not we need to do the gethash call. > > Henry, if I understand you correctly, we currently only send 4-byte prefixes > when doing completions in V4, right? This means we don't have to do anything > and can just resolve this bug? No. We send as long as we match the prefix [1]. If we decide to always send 4 bytes prefix to google server for privacy issue, I can fix it in this bug and get rid of the annoying if-else in [1] :). [1] https://dxr.mozilla.org/mozilla-central/rev/3cedab21a7e65e6a1c4c2294ecfb5502575a46e3/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp#992
Flags: needinfo?(hchang)
(In reply to Henry Chang [:henry][:hchang] from comment #3) > No. We send as long as we match the prefix [1]. If we decide to always send > 4 bytes > prefix to google server for privacy issue, I can fix it in this bug and get > rid of > the annoying if-else in [1] :). Ok, sounds good, let's make it always 4-bytes.
Assignee: francois → nobody
Status: ASSIGNED → NEW
No longer blocks: 1329808
No longer depends on: 1322523
Summary: Figure out how long the partial hash we should send for hash completion. → Always send a 4-byte prefix when doing V4 completions
Blocks: 1329808
No longer blocks: 1297962
Assignee: nobody → hchang
Attachment #8834236 - Flags: review?(francois) → review+
Pushed by fmarier@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4f30316c8432 Send 4-byte prefix for both v2/v4 tables. r=francois
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: