amark / gun

An open source cybersecurity protocol for syncing decentralized graph data.
https://gun.eco/docs
Other
18.14k stars 1.17k forks source link

SEA Certify does not work when more than 1 pub is supplied #1144

Open jakethejab opened 3 years ago

jakethejab commented 3 years ago

I'm experiencing an issue with SEA certify. If I provide the pub of 1 user it works fine (the user is able to write to the authority user's graph). If I provide more than 1 pub, it does not work at all.

This works:

const cert = await SEA.certify(
  ['H5LBBxrb0wFukxlI9YAFif9M-LVE6JFtRwvMZCTfe54.CzOB4zTpzR3OPa7Ncf6pfOVmyXiAJp3-XohtcBgvwBw'],  // 1 pub provided
  {"*": "messages", '+': '*' },
  authorityUser.pair(),
  null
);

This doesn't:

const cert = await SEA.certify(
  ['H5LBBxrb0wFukxlI9YAFif9M-LVE6JFtRwvMZCTfe54.CzOB4zTpzR3OPa7Ncf6pfOVmyXiAJp3-XohtcBgvwBw', 'eBv261G2jBJOQzAUEb-jn6XISvRQq3rbPgLaatrC9qQ.ZUXChPYESeYFiGizTuppffBETXaBnOTAYjValT1qpsg'], // 2 pubs provided
  {"*": "messages", '+': '*' },
  authorityUser.pair(),
  null
);

When supplying more than 1 pub for the certificate, puts to the authority user's graph will silently fail, there is no acknowledgement or error message.

mimiza commented 3 years ago

Thanks. I'll fix this after certify block is fixed.

mimiza commented 9 months ago

This PR fixes this issue: https://github.com/amark/gun/pull/1358