Explorar el Código

Don't hash because Henry is hashist!

James Allen hace 12 años
padre
commit
68c428545d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      libraries/redis-wrapper/index.coffee

+ 1 - 1
libraries/redis-wrapper/index.coffee

@@ -27,7 +27,7 @@ module.exports = RedisSharelatex =
 		heartbeatInterval = heartbeatOpts.heartbeat_interval or 1000 #ms
 		reconnectAfter = heartbeatOpts.reconnect_after or 5000 #ms
 		
-		id = require("crypto").createHash("md5").update(Math.random().toString()).digest("hex")
+		id = require("crypto").randomBytes(16).toString("hex")
 		heartbeatChannel = "heartbeat-#{id}"
 		lastHeartbeat = Date.now()