Description was changed from ========== bluetooth: Test Web Bluetooth getCharacteristic calls against blacklist. BUG=584398 ========== ...
4 years, 10 months ago
(2016-02-23 21:57:16 UTC)
#1
Description was changed from
==========
bluetooth: Test Web Bluetooth getCharacteristic calls against blacklist.
BUG=584398
==========
to
==========
bluetooth: Add Web Bluetooth blacklist checks to getCharacteristic.
Disallow access to blacklisted characteristic UUIDs, as per Web Bluetooth
specification:
https://webbluetoothcg.github.io/web-bluetooth/#the-gatt-blacklist
BUG=584398
==========
isherman, PTAL at histograms.xml Thanks ortuno, see below: https://codereview.chromium.org/1697873002/diff/20001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1697873002/diff/20001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode796 content/browser/bluetooth/bluetooth_dispatcher_host.cc:796: if ...
4 years, 10 months ago
(2016-02-24 19:51:30 UTC)
#7
isherman, PTAL at histograms.xml
Thanks ortuno, see below:
https://codereview.chromium.org/1697873002/diff/20001/content/browser/bluetoo...
File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right):
https://codereview.chromium.org/1697873002/diff/20001/content/browser/bluetoo...
content/browser/bluetooth/bluetooth_dispatcher_host.cc:796: if
(BluetoothBlacklist::Get().IsExcluded(
On 2016/02/23 22:37:58, ortuno wrote:
> You probably want to crash the renderer in QueryCacheForCharacteristic if the
> UUID is blacklisted.
We discussed in person, and concluded that the initial blacklist checks will
result in service and characteristics not being found in respective lists and
also resulting in renderer crashes in QueryCache* methods if a blacklisted
resource is attempted to be accessed.
No code change made.
https://codereview.chromium.org/1697873002/diff/20001/content/shell/browser/l...
File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
(left):
https://codereview.chromium.org/1697873002/diff/20001/content/shell/browser/l...
content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:69:
const char kHeartRateMeasurementUUID[] = "2a37";
On 2016/02/23 22:37:58, ortuno wrote:
> Unsure if alphabetical is the right order. I think ordering them by UUIDs
makes
> it easier to see if a service has it's corresponding characteristics and makes
> it easier to see which Characteristic corresponds to which Service:
>
> kHeartRateServiceUUID
> kHeartRateMeasurementUUID
> kBodySensorLocationUUID
>
> What do you think?
Splitting the Services and Characteristics SGTM.
I don't think sorting by UUID value helps much. Doing that sort it mostly just
looks jumbled to me. Here in comment are both, and in code patch I'm uploading
alphabetical by name.
// sorted by name:
// Bluetooth UUIDs suitable to pass to BluetoothUUID():
// Services:
const char kBatteryServiceUUID[] = "180f";
const char kDeviceInformationServiceUUID[] = "180a";
const char kGenericAccessServiceUUID[] = "1800";
const char kGlucoseServiceUUID[] = "1808";
const char kHeartRateServiceUUID[] = "180d";
const char kHumanInterfaceDeviceServiceUUID[] = "1812";
const char kTxPowerServiceUUID[] = "1804";
// Characteristics:
const char kBodySensorLocation[] = "2a38";
const char kDeviceNameUUID[] = "2a00";
const char kHeartRateMeasurementUUID[] = "2a37";
const char kSerialNumberStringUUID[] = "2a25";
// or sorted by UUID:
// Services:
const char kGenericAccessServiceUUID[] = "1800";
const char kTxPowerServiceUUID[] = "1804";
const char kGlucoseServiceUUID[] = "1808";
const char kDeviceInformationServiceUUID[] = "180a";
const char kHeartRateServiceUUID[] = "180d";
const char kBatteryServiceUUID[] = "180f";
const char kHumanInterfaceDeviceServiceUUID[] = "1812";
// Characteristics:
const char kDeviceNameUUID[] = "2a00";
const char kSerialNumberStringUUID[] = "2a25";
const char kHeartRateMeasurementUUID[] = "2a37";
const char kBodySensorLocation[] = "2a38";
https://codereview.chromium.org/1697873002/diff/20001/content/shell/browser/l...
File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
(right):
https://codereview.chromium.org/1697873002/diff/20001/content/shell/browser/l...
content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:65:
const char kDeviceInformationServiceUUID[] = "180A";
On 2016/02/23 22:37:58, ortuno wrote:
> Use lower-case i.e. 180a
Done.
https://codereview.chromium.org/1697873002/diff/20001/content/shell/browser/l...
content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:72:
const char kSerialNumberStringUUID[] = "2A25";
On 2016/02/23 22:37:59, ortuno wrote:
> Same here use lower-case. 2a25
Done.
https://codereview.chromium.org/1697873002/diff/20001/content/shell/browser/l...
File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h
(right):
https://codereview.chromium.org/1697873002/diff/20001/content/shell/browser/l...
content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h:216:
// - Device Information Service - Characteristics as described in
On 2016/02/23 22:37:59, ortuno wrote:
> The services in the device should match the UUIDs above.
Done.
https://codereview.chromium.org/1697873002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp (right):
https://codereview.chromium.org/1697873002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp:64:
MAP_ERROR(GetCharacteristicWithBlacklistedUUID, SecurityError,
"getCharacteristic() called with blacklisted UUID. https://goo.gl/4NeimX");
On 2016/02/23 22:37:59, ortuno wrote:
> I would call the error BlacklistedCharacteristicUUID and use
> getCharacteristic(s) that way we can use the error for both
getCharacteristic()
> and getCharacteristics().
Done.
Ilya Sherman
histograms.xml lgtm
4 years, 10 months ago
(2016-02-24 22:31:15 UTC)
#8
histograms.xml lgtm
ortuno
lgtm https://codereview.chromium.org/1697873002/diff/40001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc (right): https://codereview.chromium.org/1697873002/diff/40001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode723 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:723: EXPECT_CALL(*serial_number_string, ReadRemoteCharacteristic(_, _)).Times(0); I think you should just ...
4 years, 10 months ago
(2016-02-24 23:08:17 UTC)
#9
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1697873002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1697873002/60001
4 years, 10 months ago
(2016-02-24 23:41:00 UTC)
#14
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1697873002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1697873002/80001
4 years, 10 months ago
(2016-02-24 23:45:15 UTC)
#17
Issue 1697873002: bluetooth: Test Web Bluetooth getCharacteristic calls against blacklist.
(Closed)
Created 4 years, 10 months ago by scheib
Modified 4 years, 10 months ago
Reviewers: ortuno, Ilya Sherman
Base URL: https://chromium.googlesource.com/chromium/src.git@bt-blacklist-integration-
Comments: 20