mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Replace Math.random with crypto.getBytes for session tokens
This commit is contained in:
@@ -18,9 +18,10 @@ var net = require("net");
|
||||
var fs = require("fs-extra");
|
||||
var path = require("path");
|
||||
var os = require("os");
|
||||
const crypto = require("crypto");
|
||||
|
||||
function getListenPath() {
|
||||
var seed = (0x100000+Math.random()*0x999999).toString(16);
|
||||
var seed = crypto.randomBytes(8).toString('hex');
|
||||
var fn = 'node-red-git-askpass-'+seed+'-sock';
|
||||
var listenPath;
|
||||
if (process.platform === 'win32') {
|
||||
|
Reference in New Issue
Block a user