OriginProtocol / origin-js

We've moved to a monorepo: https://github.com/OriginProtocol/origin
MIT License
81 stars 33 forks source link

🐃 Seller could steal money with bad IPFS data #562

Closed DanielVF closed 5 years ago

DanielVF commented 5 years ago

One attack we need to avoid:

Fortunately, this can't be don't today because we don't actually read the IPFS json from the accept event. If it were to work, it would go like this:

originTest.contractService.call("V00_Marketplace", "acceptOffer", [
  30, // listing index
  0,  // offer index
  originTest.contractService.getBytes32FromIpfsHash("QmW3FgNGeD46kHEryFUw1ftEUqRw254WkKxYeKaouz7DJA")])