New issue
Advanced search Search tips

Issue 691031 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Feature

Blocked on:
issue 690714
issue 695123



Sign in to add a comment

Use [SecureContext] for navigator.usb

Project Member Reported by reillyg@chromium.org, Feb 10 2017

Issue description

Using [SecureContext] on the NavigatorUsb partial interface seems strictly better than manually adding checks to all methods implemented on the USB interface.
 
Blockedon: 695123
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9a05ae84e268e91f39a684bc565484110c16da1b

commit 9a05ae84e268e91f39a684bc565484110c16da1b
Author: reillyg <reillyg@chromium.org>
Date: Wed Feb 22 23:05:19 2017

Make the navigator.usb attribute accessible only in secure contexts.

Instead of performing secure context checks inside every method of the
USB object this change removes it from the Navigator object when not in
a secure context. This is equivalent to adding the [SecureContext]
extended attribute to the NavigatorUSB interface but the WebIDL code
generator doesn't support mixing it with [OriginTrialEnabled]. Instead
the secure context check is added to the hand-written Origin Trial code
in ConditionalFeaturesForModules.cpp.

BUG= 691031 

Review-Url: https://codereview.chromium.org/2698083008
Cr-Commit-Position: refs/heads/master@{#452256}

[add] https://crrev.com/9a05ae84e268e91f39a684bc565484110c16da1b/third_party/WebKit/LayoutTests/http/tests/usb/insecure-context.html
[add] https://crrev.com/9a05ae84e268e91f39a684bc565484110c16da1b/third_party/WebKit/LayoutTests/http/tests/usb/secure-context.html
[modify] https://crrev.com/9a05ae84e268e91f39a684bc565484110c16da1b/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp
[modify] https://crrev.com/9a05ae84e268e91f39a684bc565484110c16da1b/third_party/WebKit/Source/modules/webusb/NavigatorUSB.idl
[modify] https://crrev.com/9a05ae84e268e91f39a684bc565484110c16da1b/third_party/WebKit/Source/modules/webusb/USB.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment