diff --git a/controllers/forms.js b/controllers/forms.js index 046f30b3..62ada4c9 100644 --- a/controllers/forms.js +++ b/controllers/forms.js @@ -123,7 +123,7 @@ router.post('/deletesessions', useSession, sessionRefresh, csrf, calcPerms, isLo //removes captcha cookie, for refreshing for noscript users router.post('/newcaptcha', newCaptchaForm); //solve captcha for block bypass -router.post('/blockbypass', geoIp, processIp, useSession, sessionRefresh, calcPerms, verifyCaptcha, setQueryLanguage, blockBypassForm); +router.post('/blockbypass', geoIp, processIp, useSession, sessionRefresh, calcPerms, setQueryLanguage, verifyCaptcha, blockBypassForm); module.exports = router; diff --git a/gulp/res/js/forms.js b/gulp/res/js/forms.js index d86b0b05..30eb045f 100644 --- a/gulp/res/js/forms.js +++ b/gulp/res/js/forms.js @@ -334,12 +334,12 @@ class postFormHandler { } else { //not a 200 so probably error - if (!this.captchaField && json.message === 'Incorrect captcha answer') { + if (!this.captchaField && json.message === __('Incorrect captcha answer')) { /* add missing captcha field if we got an error about it and the form has no captcha field (must have been enabeld after we loaded the page) */ captchaController.addMissingCaptcha(); this.captchaField = true; - } else if (json.message === 'Captcha expired') { + } else if (json.message === __('Captcha expired')) { //if captcha is expired, just refresh the captcha const captcha = this.form.querySelector('.captcharefresh'); if (captcha) {