mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Use crypto/rand, not math/rand, to generate session IDs.
math/rand always uses a deterministic seed. The sequence of session IDs was therefore always the same: Uv38ByGCZU8WP18PmmIdcg lWbHTRDYaB0NhtHpHgAWeQ ... Multiple copies of this program would have had session ID collisions. I don't know what the consequences of that would be.
This commit is contained in:
parent
af8a026991
commit
faeb8da8c9
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"math/rand"
|
"crypto/rand"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue