Commit ea794321 authored by Ms Kimsible's avatar Ms Kimsible
Browse files

Fix undefined body param when captcha not filled

parent c306b794
......@@ -37,7 +37,7 @@ module.exports = {
async function verifyCaptcha (result, params, settingsManager) {
// mtcaptcha-response is the key that browser will generate upon form submit.
// if its blank or null means user has not selected the captcha, so return the error.
if (!params.body["mtcaptcha-response"]) {
if (!params.body || !params.body["mtcaptcha-response"]) {
return { allowed: false, errorMessage: "Captcha wasn't filled" }
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment