#357 min length of auth key and some cleanup, added config change log

This commit is contained in:
Mikayla Fischler
2023-10-14 12:02:25 -04:00
parent 6f1195dded
commit 41442012c2
3 changed files with 70 additions and 31 deletions

View File

@@ -63,6 +63,11 @@ function plc.load_config()
cfv.assert_type_num(config.TrustedRange)
cfv.assert_min(config.TrustedRange, 0)
cfv.assert_type_str(config.AuthKey)
if type(config.AuthKey) == "string" then
local len = string.len(config.AuthKey)
cfv.assert_eq(len == 0 or len >= 8, true)
end
end
cfv.assert_type_int(config.LogMode)