Fix a vulnerability in password encryption

* There was an error in the encryption used to save passwords,
  now it's really harder to decrypt the password from the config file
* Other minor changes
This commit is contained in:
Eduardo Bart
2013-01-26 14:38:48 -02:00
parent 18af9a45ee
commit 07959ddc04
11 changed files with 72 additions and 20 deletions

View File

@@ -82,6 +82,14 @@ function init()
g_keyboard.bindKeyDown('Ctrl+Shift+R', reloadScripts)
-- generate machine uuid, this is a security measure for storing passwords
if not g_crypt.setMachineUUID(g_configs.get('uuid')) then
local uuid = g_crypt.genUUID()
g_crypt.setMachineUUID(uuid)
g_configs.set('uuid', uuid)
g_configs.save()
end
connect(g_app, { onRun = startup })
end