Our log scrubber was a bit over-zealous and was scrubbing timestamps as
well. While we're still over-scrubbing, we're now more precise and
ensure that compressed IPv6 addresses have "::"
This is related to the proxy-go deadlock bug #25688. If a client doesn't
do anything with the SDP answer, a token will get lost. Added a timeout
after a minute that checks the PeerConnection state and destroys the
peer connection and returns a token if did not yet succeed
This is a fix for the proxy-go deadlock bug (ticket #25688). The
assumption that OnIceComplete is always followed by a successful
connection where OnDataChannel has been called turns out not to occur in
practice. OnICEComplete looks like it is being deprecated in other
libraries anyway, so it's safer to just remove it.
Modified regular expressions to not scrub fingerprints, but catch all
instances of IPv4 and IPv6 addresses. Expanded test cases with those
suggested by dcf.
Log scrubber now scrubs addresses even in the case where they are split
across calls to the scrubber's output io.Writer.
Added test cases to test that the writer behaves correctly across split
lines.
Added a scrubber that takes all logging output to the standard logger
and passes through a series of regular expressions to replace IP
addresses with safe strings (e.g., X.X.X.X:443).
Ensure server logs to stdout are also scrubbed
The binaryType can be "arraybuffer" or "blob", and "blob" is the
default. The code is only aware of "arraybuffer": I discovered a problem
while running snowflake.html in debug mode; this code fails:
if DEBUG
# Go sends only raw bytes...
if '[object ArrayBuffer]' == recv.toString()
bytes = new Uint8Array recv
line = String.fromCharCode.apply(null, bytes)
line = line.trim()
log 'WebRTC --> websocket data: ' + line
with the error:
TypeError: line.trim is not a function[Learn More] snowflake.js:497:16
because recv is of type Blob, not ArrayBuffer.
Despite the unexpected type, the code seemed to work as expected when
not in debug mode. Though the two types provide different interfaces,
they are both valid to pass on to WebSocket.send. The only other thing
we did with it was try to read the .length member for rate-limiting
purposes:
@rateLimit.update chunk.length
but .length is incorrect for either type: Blob uses .size and
ArrayBuffer uses .byteLength. It worked anyway, because
DummyRateLimit.update doesn't actually look at its argument.
We were already setting binaryType="arraybuffer" for WebSocket
connections.
ReferenceError: age is not defined snowflake.js:265:7
BucketRateLimit.prototype.when snowflake/proxy/build/snowflake.js:265:7
ProxyPair.prototype.flush snowflake/proxy/build/snowflake.js:558:63
bind/< snowflake/proxy/build/snowflake.js:10:56
ProxyPair.prototype.onClientToRelayMessage snowflake/proxy/build/snowflake.js:495:14
bind/< snowflake/proxy/build/snowflake.js:10:56
You can nest a "describe" in a "describe":
describe
describe
it
But you can't nest an "it" in an "it":
describe
it
it
The nested "it"s were not getting run (or getting run, but their output
ignored, I'm not sure).
Before this change:
41 specs, 0 failures
After:
44 specs, 5 failures
https://bugs.torproject.org/25600#comment:14
Snowflake in Tor Browser has been hanging after surfing for a while.
(Tor reports "no running bridges".) It only began happening after commit
12922a232b, which caused snowflake-client not to log to a file by
default (leaving it to log to its default stderr). What seems to be
happening is that tor doesn't read from its PT clients' stderr, leaving
a buffer to fill up that eventually causes a hang.
The semicolons made it look like the end of a declaration. I got these
errors in the Firefox console:
Expected declaration but found ‘1px’. Skipped to next declaration. 1 embed.html:29:17
Expected declaration but found ‘-1px’. Skipped to next declaration. 1 embed.html:30:17