mirror of
https://github.com/kepler155c/opus
synced 2025-10-15 07:47:40 +00:00
security cleanup
This commit is contained in:
@@ -61,10 +61,18 @@ function os.verifyPassword(password)
|
||||
end
|
||||
|
||||
function os.getSecretKey()
|
||||
if not fs.exists('.secret') then
|
||||
Util.writeFile('.secret', math.random(100000, 999999))
|
||||
Config.load('os', config)
|
||||
if not os.secretKey then
|
||||
os.secretKey = math.random(100000, 999999)
|
||||
Config.update('os', config)
|
||||
end
|
||||
return Util.readFile('.secret')
|
||||
return os.secretKey
|
||||
end
|
||||
|
||||
function os.updatePassword(password)
|
||||
Config.load('os', config)
|
||||
config.password = password
|
||||
Config.update('os', config)
|
||||
end
|
||||
|
||||
function os.getPassword()
|
||||
|
Reference in New Issue
Block a user