[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #28732 [Obfuscation/Snowflake]: Standardize on ArrayBuffer as the type of WebRTC messages
#28732: Standardize on ArrayBuffer as the type of WebRTC messages
---------------------------------------+--------------------
Reporter: dcf | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Obfuscation/Snowflake | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
---------------------------------------+--------------------
Two problems:
1. The proxy receives binary messages over an
[https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel
RTCDataChannel] without specifying what the type of those messages should
be. Some debugging code is written to handle the type
[https://developer.mozilla.org/en-US/docs/Web/API/ArrayBuffer
ArrayBuffer], but when I tried it the type was actually
[https://developer.mozilla.org/en-US/docs/Web/API/Blob Blob], which
crashed the debug code.
1. Snowflake uses exclusively binary WebRTC data, but the test code uses
strings as message contents rather than one of the binary data types.
This wasn't a huge problem, because strings `ArrayBuffer`s and `Blob`s are
all valid to pass to `WebSocket.send`. The only other thing we do other
than `send` them is take their length for the purpose of rate limiting,
and that ''is'' broken.
https://gitweb.torproject.org/user/dcf/snowflake.git/log/?h=arraybuffer&id=73f328fef8a9351afc47bb65a68b549fbab90cad
https://gitweb.torproject.org/user/dcf/snowflake.git/diff/?h=arraybuffer&id=73f328fef8a9351afc47bb65a68b549fbab90cad&id2=5817c257c1568c403a41e108d195b209e4e5f589
This branch sets [https://developer.mozilla.org/en-
US/docs/Web/API/RTCDataChannel/binaryType binaryType = "arraybuffer"] so
that we don't get unexpected `Blob` objects. It then makes changes to the
test and rate-limiting code to standardize on the ArrayBuffer interface
everywhere.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28732>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs