Skip to content

simperium-js does not allow editing of shared objects by target user #19

@bayareacoder

Description

@bayareacoder

When user A shares an object with user B, user B cannot edit the object via the Simperium-JS library.
Note that user B can edit the object via the HTTP API, hence it is not an issue with the 'write-access' setting on the server.

I believe the bug is in the bucket.update() method on line#3599 (after un-minifying) of simperium.js file hosted at "https://js.simperium.com/v0.1/

Code:
if (null != a) {
if (0 === a.length || -1 !== a.indexOf("/"))
return !1
} else ...

a is the simperiumKey. So the method returns without updating if it is either missing or has a '/' in it. But shared objects have a key of the form '/ hence the method never does the update.

I commented out /* || -1 !== a.indexOf("/") */ and it seems to work then.
Not sure why this check was done in the first place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions