Fixed security key issue
This commit is contained in:
parent
26ca5a7093
commit
a293992f12
2
bank.lua
2
bank.lua
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue