Chrome Error: Please use a browser with webcrypto support #475
Labels
area/window-ipfs
Issues related to IPFS API exposed on every page
kind/bug
A bug in existing code (including security flaws)
Projects
lidel commentedMay 8, 2018
•
edited
Problem / TL;DR
Chrome won't allow access to webcrypto for pages served via HTTP unless it's at
localhost.This means parts of
window.ipfswill be broken on non-TLS non-localhost gateways.webcryptosince version 60.How to Reproduce
window.ipfsexperiment enabledwindow.ipfs.object.put()(try this Example code)Background
This is not a bug, it is a feature sort of a thing.
Modern browsers are limiting selected APIs to be available in Secure Contexts only.
Chrome includes
webcryptoin this scheme, which means it cannot be accessed when served from insecure origin:Current list of “secure” origins according to Chrome can be found here:
Related discussion on our end: multiformats/js-multihashing-async#22
Potential Solutions
Please use a browser with webcrypto supporterror injs-multihashing-asyncto be less ambiguous, include information about the prerequisite of secure context,should we shim webcrypto when native implementation is not available?prior art: Why the requirement on webcrypto? multiformats/js-multihashing-async#22 (comment)window.ipfsis available only in secure contexts? (Restricting window.ipfs to Secure Context #476)The text was updated successfully, but these errors were encountered: