WICG / webusb

Connecting hardware to the web.
https://wicg.github.io/webusb/
Other
1.32k stars 132 forks source link

Device filter algorithm ignores serialnumber on interface match #138

Closed mitchellwills closed 6 years ago

mitchellwills commented 6 years ago

The USB device filter algorithm described in the spec short circuits when it finds a matching interface and doesn't check the serial number. For example, if an interface on a device matches the classCode, subclassCode, protocolCode filter properties, but doesn't match the serial number it will still return a match.

I have not tested the behavior of Chrome today on this.

reillyeon commented 6 years ago

In Chrome the UsbDeviceFilterMatches() function checks the serial number first and therefore avoids this issue. I will update the spec to match the implemented behavior as it is more correct.

reillyeon commented 6 years ago

This was resolved in pull #139.