From 85b5e12c9456eb5bd9bb6e5cc6802952fdb0c0fd Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Thu, 24 Oct 2019 17:45:39 -0700 Subject: [PATCH] Use alphanumeric characters for con req password --- lib/init.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/init.ts b/lib/init.ts index 0272a44..4a67fac 100644 --- a/lib/init.ts +++ b/lib/init.ts @@ -60,7 +60,7 @@ const INFORM_SCRIPT = ` const username = declare("DeviceID.ID", {value: 1}).value[0] // Password will be fixed a given device because Math.random() is seeded with devcie ID by default. -const password = "" + Math.random(); +const password = Math.trunc(Math.random() * Number.MAX_SAFE_INTEGER).toString(36); const informInterval = 300;