Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Issue 2014473002: bluetooth: Web Bluetooth can filter by empty device names, doesn't leak MACs. (Closed)

Created:
4 years, 7 months ago by scheib
Modified:
4 years, 4 months ago
Reviewers:
Tom Sepez, ortuno
CC:
blink-reviews, chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mkwst+moarreviews-shell_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, ortuno+watch_chromium.org, Peter Beverloo, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@bt-GetNameOrEmpty-
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Web Bluetooth can filter by empty device names, doesn't leak MACs. Previously BluetoothDevice::GetName was used, which had two side effects: - Filters for an empty device name did not work. - Device names returned to web pages included generic descriptions including the device address. This patch changes the filter logic and the returned device name to use BluetoothDevice::GetNameOrEmpty, which will provide the raw name from devices without modification. http://crrev.com/2017393002 GetName -> GetNameForDisplay http://crrev.com/2009753002 New GetName http://crrev.com/2014473002 Web Bluetooth updated <<< This change. http://crrev.com/2020923002 Arc Bridge updated BUG=586438 Committed: https://crrev.com/6d0965788c483ec5377c20943c1ceedfd3669a51 Cr-Commit-Position: refs/heads/master@{#409312}

Patch Set 1 : Merge #

Total comments: 9

Patch Set 2 : Merge TOT #

Patch Set 3 : Correct null handling in renderer; Null and Empty Named fakes & tests. #

Total comments: 24

Patch Set 4 : Remove optional from arguments; address other ortuno comments #

Total comments: 8

Patch Set 5 : addressed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -22 lines) Patch
M content/browser/bluetooth/bluetooth_device_chooser_controller.cc View 1 2 3 2 chunks +13 lines, -11 lines 0 comments Download
M content/browser/bluetooth/web_bluetooth_service_impl.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/bluetooth/web_bluetooth_impl.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h View 1 2 3 4 2 chunks +35 lines, -1 line 0 comments Download
M content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc View 1 2 3 4 3 chunks +43 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-name-empty-filter.html View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-name-prefix-filter.html View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-name-wrong-filter.html View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-service-filter.html View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-filter.html View 1 2 3 1 chunk +8 lines, -4 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-missing-device-from-name-empty-filter.html View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-missing-device-from-name-prefix-filter.html View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-missing-device-from-name-wrong-filter.html View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-missing-device-from-service-filter.html View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom View 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 74 (60 generated)
scheib
4 years, 7 months ago (2016-05-25 03:47:40 UTC) #2
scheib
4 years, 5 months ago (2016-07-21 01:09:47 UTC) #33
ortuno
https://codereview.chromium.org/2014473002/diff/120001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc File content/browser/bluetooth/bluetooth_device_chooser_controller.cc (right): https://codereview.chromium.org/2014473002/diff/120001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc#newcode93 content/browser/bluetooth/bluetooth_device_chooser_controller.cc:93: if (device.GetName()) { If a device doesn't have a ...
4 years, 5 months ago (2016-07-21 17:42:29 UTC) #36
scheib
https://codereview.chromium.org/2014473002/diff/120001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc File content/browser/bluetooth/bluetooth_device_chooser_controller.cc (right): https://codereview.chromium.org/2014473002/diff/120001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc#newcode93 content/browser/bluetooth/bluetooth_device_chooser_controller.cc:93: if (device.GetName()) { On 2016/07/21 17:42:29, ortuno wrote: > ...
4 years, 4 months ago (2016-07-30 02:38:14 UTC) #46
scheib
Try jobs complain that we don't have string resources, which the empty name is causing ...
4 years, 4 months ago (2016-07-30 03:07:54 UTC) #49
ortuno
I'm surprised by the resources error. Our mocks should be overriding the GetNameForDisplay function... https://codereview.chromium.org/2014473002/diff/120001/content/browser/bluetooth/web_bluetooth_service_impl.cc ...
4 years, 4 months ago (2016-07-31 18:00:06 UTC) #50
scheib
https://codereview.chromium.org/2014473002/diff/180001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc File content/browser/bluetooth/bluetooth_device_chooser_controller.cc (right): https://codereview.chromium.org/2014473002/diff/180001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc#newcode72 content/browser/bluetooth/bluetooth_device_chooser_controller.cc:72: if (filter->name.size() > kMaxLengthForDeviceName) On 2016/07/31 18:00:05, ortuno wrote: ...
4 years, 4 months ago (2016-08-02 03:24:34 UTC) #56
ortuno
lgtm with some optional nits. https://codereview.chromium.org/2014473002/diff/220001/third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-name-empty-filter.html File third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-name-empty-filter.html (right): https://codereview.chromium.org/2014473002/diff/220001/third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-name-empty-filter.html#newcode9 third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-name-empty-filter.html:9: .then(() => requestDeviceWithKeyDown({ optional ...
4 years, 4 months ago (2016-08-02 04:13:40 UTC) #57
scheib
https://codereview.chromium.org/2014473002/diff/220001/third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-name-empty-filter.html File third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-name-empty-filter.html (right): https://codereview.chromium.org/2014473002/diff/220001/third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-name-empty-filter.html#newcode9 third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-empty-device-from-name-empty-filter.html:9: .then(() => requestDeviceWithKeyDown({ On 2016/08/02 04:13:40, ortuno wrote: > ...
4 years, 4 months ago (2016-08-02 18:50:28 UTC) #62
scheib
tsepez: OWNERS check of mojom file, please.
4 years, 4 months ago (2016-08-02 20:14:26 UTC) #64
Tom Sepez
Mojo RS LGTM on making parameter optional.
4 years, 4 months ago (2016-08-02 20:19:16 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2014473002/240001
4 years, 4 months ago (2016-08-02 20:36:54 UTC) #70
commit-bot: I haz the power
Committed patchset #5 (id:240001)
4 years, 4 months ago (2016-08-02 20:42:20 UTC) #72
commit-bot: I haz the power
4 years, 4 months ago (2016-08-02 20:44:15 UTC) #74
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/6d0965788c483ec5377c20943c1ceedfd3669a51
Cr-Commit-Position: refs/heads/master@{#409312}

Powered by Google App Engine
This is Rietveld 408576698