mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-24 01:29:35 +02:00
Merge pull request #5115 from overleaf/jpa-recaptcha-detection
[web] form-helpers/captcha: step up detection of loaded recaptcha GitOrigin-RevId: d9ed3b99277ffcdca68df9f8e0b162faeb363451
This commit is contained in:
@@ -4,7 +4,14 @@ let recaptchaId
|
||||
const recaptchaCallbacks = []
|
||||
|
||||
export async function validateCaptchaV2() {
|
||||
if (typeof grecaptcha === 'undefined') {
|
||||
if (
|
||||
// Detect blocked recaptcha
|
||||
typeof grecaptcha === 'undefined' ||
|
||||
// Detect stubbed recaptcha
|
||||
typeof grecaptcha.render !== 'function' ||
|
||||
typeof grecaptcha.execute !== 'function' ||
|
||||
typeof grecaptcha.reset !== 'function'
|
||||
) {
|
||||
return
|
||||
}
|
||||
if (recaptchaId === undefined) {
|
||||
|
||||
Reference in New Issue
Block a user