amark / gun

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

Gun ignores '/' at the end of soul policy #1291

Open ViteOrder opened 1 year ago

ViteOrder commented 1 year ago

Heres a senario:

{
  "mention": {
     // I want users to be able to write
    "posts": {
       // here
    },
    "comments": {
      // and here
    },
    // but not here, in the mention soul itself
  } 
}

I should be able to solve this using one certificate; one that requires the soul to start with mention/. This should work because ~pub/mention and ~pub/mention/ are two different nodes But, as shown by this jsbin, it does not. The policy {"*":"mention/"} allows people to write to ~pub/mention

In the usecase I showed this can easily be worked around by using two certificates, but I think I think this should be fixed regardless