Disable sensitive APIs (eg. window.ipfs.config). Provide a capabilities API. #478
Labels
area/window-ipfs
Issues related to IPFS API exposed on every page
kind/discussion
Topical discussion; usually not changes to codebase
topic/security
Work related to security
A dapp should't be able to change my IPFS node config.
It may reasonably want to know what features are enabled. Peerpad uses pubsub, so it would need to check if window.ipfs provided the capabilities it requires before deciding whether to use it or init a custom one. We could let dapps read the config, but an considered api for determining what capabilities window.ipfs is offering seems preferable. Perhaps a "can i have an ipfs node with this config" api?
which returns null or throws if the
ipfs
instance you'd get back can't match your requirements.or just a "tell me what is enabled api"
vaguely relevant.
https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints
The text was updated successfully, but these errors were encountered: