improve captcha template path verif

This commit is contained in:
he2ss 2022-02-08 17:50:28 +01:00
parent 6f689d54ec
commit 4313d97ba6

View file

@ -45,6 +45,9 @@ function M.New(siteKey, secretKey, TemplateFilePath)
M.SecretKey = secretKey
if TemplateFilePath == nil then
return "CAPTCHA_TEMPLATE_PATH variable is empty, will ban without template"
end
if utils.file_exist(TemplateFilePath) == false then
return "captcha template file doesn't exist, can't use recaptcha"
end