-
Notifications
You must be signed in to change notification settings - Fork 333
Closed
Labels
area/window-ipfsIssues related to IPFS API exposed on every pageIssues related to IPFS API exposed on every pagestatus/deferredConscious decision to pause or backlogConscious decision to pause or backlogtopic/securityWork related to securityWork related to security
Description
Problem
window.ipfs.name.publish
enables sites to publish content to IPNS- keys can be listed via
ipfs.keys.ls
- this results in sites being able to publish arbitrary CID under any key
- v2.2.0 assumes ACL dialog asking for access too
ipfs.name.publish
andipfs.keys.ls
is enough, shifting responsibility to user
- v2.2.0 assumes ACL dialog asking for access too
This PoC will use default key and publish under your PeerID
:
ipfs.name.publish('/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR', (err, name) => console.log(err, name))
Potential Solutions
- leave it as-is (shifting responsibility to user does not smell good)
- fix it:
ipfs.keys
andipfs.name.publish
should be scoped in a fashion similar toipfs.files
- website should not be able to sniff out what keys are in my possession
- names of keys generated via
window.ipfs.key.gen
should be prefixed with unique scope and everything that is not in scope should be filtered out in allwindow.ipfs.keys.*
ipfs.name.publish
defaults toself
key if key name is not provided which means publishing to/ipns/<PeerID>
- should this behaviour should be left intact? if so, we need to generate a new key just for the current scope and explicitly add it to the call behind the scenes.
cc @alanshaw
Powersource
Metadata
Metadata
Assignees
Labels
area/window-ipfsIssues related to IPFS API exposed on every pageIssues related to IPFS API exposed on every pagestatus/deferredConscious decision to pause or backlogConscious decision to pause or backlogtopic/securityWork related to securityWork related to security