MyBB Community Forums

Full Version: recaptcha stops working if you set a SCP header
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Recaptcha v2 does show up fine but you can never submit the form not even if you correctly solve the challenge


Quote:script-src 'self' https://www.google.com/recaptcha https://www.gstatic.com/recaptcha 'unsafe-inline' 'unsafe-eval'; frame-src 'self' https://www.google.com/recaptcha https://recaptcha.google.com/recaptcha/;


this answer is on google website https://developers.google.com/recaptcha/...-recaptcha but it does not work no idea what i'm missing .
Looks like slashes / at the end of paths are missing - try:
script-src 'self' https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/ 'unsafe-inline' 'unsafe-eval'; frame-src 'self' https://www.google.com/recaptcha/ https://recaptcha.google.com/recaptcha/
Visiting the forum using http:// may also cause issues.

Any errors related to CSP should be reported in the browser's Console.
Hello,

I'll try that the console trick i know .

Hello,

No not working however i discoverd something interesting when you try to submit the form and after that look in the browser console i found these url's

https://www.google.com/recaptcha/api.js
https://fonts.googleapis.com/css?family=Ubuntu:400,700
https://www.gstatic.com/recaptcha/releases/-nejAZ5my6jV0Fbx9re8ChMK/recaptcha__nl.js
https://www.google.com/recaptcha/api2/anchor?ar=1&k=6LfY2eEZAAAAAMOpmp1Po80WzzKabgeHHN8olkSJ&co=aHR0cHM6Ly93d3cuc2NhbWFsZXJ0LmJlOjQ0Mw..&hl=nl&v=-nejAZ5my6jV0Fbx9re8ChMK&theme=dark&size=normal&cb=yt4352x5dzt4
https://www.gstatic.com/recaptcha/releases/-nejAZ5my6jV0Fbx9re8ChMK/styles__ltr.css
https://www.gstatic.com/recaptcha/releases/-nejAZ5my6jV0Fbx9re8ChMK/recaptcha__nl.js
https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxP.ttf
https://www.google.com/js/bg/HqR6ZpV2bbHi3C1Qaeqq8e7Jg45WYRs5Tw9Iq1OyTls.js
https://www.google.com/recaptcha/api2/webworker.js?hl=nl&v=-nejAZ5my6jV0Fbx9re8ChMK
https://www.gstatic.com/recaptcha/releases/-nejAZ5my6jV0Fbx9re8ChMK/recaptcha__nl.js
https://www.gstatic.com/recaptcha/releases/-nejAZ5my6jV0Fbx9re8ChMK/styles__ltr.css
csp blocks everything unless you put it in the correct directive but there is "no real csp related error message"  strange

Hello,

The fact recaptcha is not working has nothing todo with CSP so it seems i know because i disabled CSP and it failed once again however on the top of my recaptcha account it says


Quote:We have detected that your site is not verifying reCAPTCHA solutions. This is required for correct use of reCAPTCHA on your site


Now what ? help ....