Skip to content

[BUDI-6604] CSP blocking custom components use of Google Recaptcha #9679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
keith-ellis-sillek opened this issue Feb 13, 2023 · 8 comments
Closed
1 task done
Labels
bb-plugins bug Something isn't working hurricane Created by Linear-GitHub Sync linear stale

Comments

@keith-ellis-sillek
Copy link

keith-ellis-sillek commented Feb 13, 2023

Checklist

  • I have searched budibase discussions and github issues to check if my issue already exists

Hosting

  • Self
    • Method: docker compose - digital ocean
    • Budibase Version: 2.1.12
    • App Version: n/a

Describe the bug
I created a custom component for Budibase here - https://github.com/keith-ellis-sillek/budibase-recaptura-v2
It works beautifully in development on localhost. However, when I deploy, it fails CSP for https://www.google.com/recaptcha/api.js I understand that you don't want to add just anyone's libraries, but could you add google's?

To Reproduce
Steps to reproduce the behavior:

  1. Install a local hosted version of Budi
  2. Add the plugin listed above
  3. Create a test app and add the recaptcha component
  4. The component renders in both the builder and preview
  5. Do steps 2-4 for a deployed version of Budi
  6. The component doesn't render and in the brower's development tools, you get a csp:blocked error

Expected behavior
Like it to render?!

Screenshots
On a plane, but will try to post when I land

App Export
If possible - please attach an export of your budibase application for debugging/reproduction purposes.

Desktop (please complete the following information):

  • OS: MacBook Air M1
  • Browser Chrome
  • Version 109.0.5414.119

Additional context

BUDI-6604

@keith-ellis-sillek keith-ellis-sillek added the bug Something isn't working label Feb 13, 2023
@keith-ellis-sillek
Copy link
Author

Screenshot 2023-02-13 at 6 29 25 PM

Screenshot 2023-02-13 at 6 30 04 PM

@giacomouberti
Copy link

I have the same issue, I wrote a custom component to embed a script in order to be able to add a comment box inside a side panel but the script gets blocked, custom components should be able to allow for external scripts to be loaded or at least should be possible to extend the CSP directive

Refused to load the script 'https://cdn.commento.io/js/commento.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.budibase.net https://cdn.budi.live https://js.intercomcdn.com https://widget.intercom.io". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

@shogunpurple shogunpurple changed the title CSP blocking custom components use of Google Recaptcha [BUDI-6604] CSP blocking custom components use of Google Recaptcha Feb 19, 2023
@stale
Copy link

stale bot commented Jun 10, 2023

This issue has been automatically marked as stale because it has not had recent activity.

@melohagan
Copy link
Collaborator

Hey @keith-ellis-sillek

I was going to test this one, however you do not have a release tied to the plugin repo. You'll need to add the release.yml, update the version number in the package.json, and then push up those changes.

E.g. https://github.com/melohagan/budibase-datasource-appwrite-attributes-indexes/tree/main/.github/workflows

@keith-ellis-sillek
Copy link
Author

keith-ellis-sillek commented Dec 20, 2023 via email

@keith-ellis-sillek
Copy link
Author

keith-ellis-sillek commented Dec 20, 2023 via email

@Baud-Hacker
Copy link

I'd love ann update on this. I'm looking to host a public form and want some bot protection...

Copy link
Contributor

github-actions bot commented May 5, 2025

This issue has been automatically marked as stale as there has been no activity for 6 months.

@github-actions github-actions bot added the stale label May 5, 2025
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bb-plugins bug Something isn't working hurricane Created by Linear-GitHub Sync linear stale
Projects
None yet
Development

No branches or pull requests

5 participants