I want to use reCAPTCHA on a site on which we use a very strict content security policy. In order to avoid XSS, no javascript are allowed to execute on the same domain as where the HTML is kept (i.e. no 'unsafe-inline', 'unsafe-eval' and no 'self'). Is there any way to achieve this using reCAPCTHA?
- Inline 'javascript:' URL:s:
c("recaptcha_reload", "refresh", "refresh_btn", "javascript:Recaptcha.reload();");
c("recaptcha_switch_audio", "audio", "audio_challenge", "javascript:Recaptcha.switch_type('audio');");
c("recaptcha_switch_img", "text", "visual_challenge", "javascript:Recaptcha.switch_type('image');");
- Illegal use of setTimeout;
setInterval('Recaptcha.reload("t");', a);
- Inline javascript code;
document.write('<script>Recaptcha.widget = Recaptcha.$("recaptcha_widget_div"); Recaptcha.challenge_callback();<\/script>')
Is there a way to use reCAPTCHA natively without having to allow inline scripting and eval? If not, is there any plans to update reCAPTCHA to allow a stricter policy?