Skip to content

Error on complex JSON objects as literals #3

Description

@peacekeeper

The Graph implementation seems to have problems if the value of an XDI literal is a complex JSON object, e.g. a serialized XDI message.

Example: Sending the following message:

([=]!:uuid:1111[$msg]!:uuid:1234$do/$set)[=]!:uuid:1111[$card]!:uuid:5678$public<#connect><#button>&/&/{"[=]!:uuid:1111[$msg]@0<$sig>&/&":".....","[=]!:uuid:1111[$msg]@0<$sig>/$is#":["$sha$256$rsa$2048"],"[=]!:uuid:1111[$msg]@0$do/$set":["[=]!:uuid:1111[$card]!:uuid:5678"],"[=]!:uuid:1111[$msg]@0$do/$is{$do}":["+respect#forever{$do}"],"[=]!:uuid:1111[$msg]@0{$card}/$is":["[=]!:uuid:1111[$card]!:uuid:5678"],"[=]!:uuid:1111[$msg]@0/$is()":["({$to})"],"[=]!:uuid:1111[$msg]@0/$do":["(=bob/+ca)+ca#community$do"]}

will result in the following error:

Error message result (check server logs!): { "serverUsed" : "localhost/127.0.0.1:27017" , "err" : "not okForStorage" , "code" : 12527 , "n" : 0 , "connectionId" : 2 , "ok" : 1.0}

Perhaps certain characters are not properly escaped when handing them off to the MongoDB driver.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions