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
I'm intuiting that the purpose of linking to github was to show the
README, not to link to the source code per se, so I changed the link to
point to the wiki page rather than gitweb.torproject.org/....
https://bugs.torproject.org/23947#comment:15
https://bugs.torproject.org/25344
5s matches DEFAULT_BROKER_POLL_INTERVAL in the JavaScript proxy.
This is set up so as long as the actual HTTPS requests take less time
than pollInterval, there will a steady one poll per pollInterval. If the
HTTPS requests take longer than that, there will be no delay between
polls.