Skip to content
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

fcl forces us to use a less secure content-security-policy #775

Closed
austinsamsel opened this issue Aug 24, 2021 · 8 comments
Closed

fcl forces us to use a less secure content-security-policy #775

austinsamsel opened this issue Aug 24, 2021 · 8 comments
Labels
Feedback gRPC Adjacent An issue where the underlying issue is directly or indirectly related to gRPC

Comments

@austinsamsel
Copy link

austinsamsel commented Aug 24, 2021

Instructions

Please fill out the template below to the best of your ability and include a label indicating which tool/service you were working with when you encountered the problem.

Problem

@onflow/protobuf calls eval in it. this is why my project is forced to allow unsafe-eval in our content-security-policy.

Steps to Reproduce

Acceptance Criteria

  • javascript applications that use fcl do not need to allow unsafe-eval

Context

n/a

@orodio orodio added the gRPC Adjacent An issue where the underlying issue is directly or indirectly related to gRPC label Sep 3, 2021
@bluesign
Copy link

bluesign commented Sep 22, 2021

Protobuf issue probably: protocolbuffers/protobuf-javascript#25

@orodio
Copy link
Contributor

orodio commented Oct 14, 2021

This also seems to be an issue for using fcl from inside of a browser extension.

cc: @gregsantos

@guanbinrui
Copy link

I have the same problem. Any workaround?

@boczeratul
Copy link
Contributor

boczeratul commented Nov 25, 2021

This was merged on Oct 15th and was included in google-protobuf@3.19.1
protocolbuffers/protobuf#8864

Updating google-protobuf version to @^3.19.1 should be able to fix this
@orodio @gregsantos

@boczeratul
Copy link
Contributor

Hmm ok seems like google-protobuf@3.19.1 still hasn't fixed all CSP unsafe-eval issues

@bluesign
Copy link

bluesign commented Dec 1, 2021

I think REST api is very soon will solve all this problems.

@mikeylemmon
Copy link

@orodio @gregsantos Any update on this? It is preventing the use of the JS SDK in contexts where it would be very useful, such as Cloudflare Workers and browser extensions. Where can I find information/follow progress on the REST api?

@gregsantos
Copy link
Member

@mikeylemmon The HTTP API has been released on testnet and mainet!
The Flow access node API for REST clients. Usable with the Flow CLI (Emulator) and FCL (Flow Client Library)

https://rest-testnet.onflow.org/v1/
Testnet: View Documentation

https://rest-mainnet.onflow.org/v1/
Mainnet: View Documentation

The SDK transport modules have moved into their own packages.
The JS-SDK now makes use of transport modules for sending an interaction to an access api and receiving a response.

More details available in the SDK CHANGELOG and on the Docs Site at onflow.org
HTTP-API Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback gRPC Adjacent An issue where the underlying issue is directly or indirectly related to gRPC
Projects
None yet
Development

No branches or pull requests

7 participants