Remove uniuri dependency
uniuri is only used in a minor way, to generate a random string for local identification of a snowflake client.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Author Owner
- Author Owner
This patch replaces
uniuri.New()
with a manual call tocrypto/rand.Read
. Panicking on read error is the same thing uniuri does. 8 hex-encoded bytes are the same length asuniuri.New()
, but only 64 bits compared touniuri.New()
's ~95 bits (16 characters of base-62).Trac:
Status: assigned to needs_review - Developer
The code looks fine and the only place I see this being used is the datachannel label which has no uniqueness requirements.
https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/label
Does that change with turbotunnel? If not, I'd say merge ready.
- Author Owner
Thanks for the review. Merged as 8eef3b63482deb50d988e3703b7a718802cdd2f1.
Now, we just have to remember to actually remove the dependency from Tor Browser the next time we update Snowflake there.
Trac:
Status: needs_review to closed
Resolution: N/A to fixed - Trac closed
closed
- Trac moved from legacy/trac#33800 (moved)
moved from legacy/trac#33800 (moved)
- Trac removed 1 deleted label
removed 1 deleted label
- David Fifield mentioned in issue tpo/applications/tor-browser-build#40342 (closed)
mentioned in issue tpo/applications/tor-browser-build#40342 (closed)
- David Fifield mentioned in commit dcf/tor-browser-build@5e61e15a
mentioned in commit dcf/tor-browser-build@5e61e15a
- David Fifield mentioned in merge request tpo/applications/tor-browser-build!322 (merged)
mentioned in merge request tpo/applications/tor-browser-build!322 (merged)
- Matthew Finkel mentioned in commit sysrqb/tor-browser-build@edeef651
mentioned in commit sysrqb/tor-browser-build@edeef651