Fixed security key issue

This commit is contained in:
Andrew Lalis 2023-08-29 15:48:54 -04:00
parent 26ca5a7093
commit a293992f12
1 changed files with 1 additions and 1 deletions

View File

@ -14,6 +14,7 @@ local ACCOUNTS_FILE = "accounts.json"
local HOST = "central-bank" local HOST = "central-bank"
local RUNNING = true local RUNNING = true
local SECURITY_KEY = nil
local g = require("simple-graphics") local g = require("simple-graphics")
local W, H = term.getSize() local W, H = term.getSize()
@ -233,7 +234,6 @@ end
local function initSecurityKey() local function initSecurityKey()
-- Initialize security key -- Initialize security key
local SECURITY_KEY_FILE = "key.txt" local SECURITY_KEY_FILE = "key.txt"
local SECURITY_KEY = nil
if not fs.exists(SECURITY_KEY_FILE) then if not fs.exists(SECURITY_KEY_FILE) then
local f = io.open(SECURITY_KEY_FILE, "w") local f = io.open(SECURITY_KEY_FILE, "w")
SECURITY_KEY = randomAccountId() .. "-" .. randomAccountId() .. "-" .. randomAccountId() .. "-" .. randomAccountId() SECURITY_KEY = randomAccountId() .. "-" .. randomAccountId() .. "-" .. randomAccountId() .. "-" .. randomAccountId()