Skip to content

Commit

Permalink
fix(w3c-did): 🐛 double the maximum size of DID documents
Browse files Browse the repository at this point in the history
Now the maximum size for DID documents is set to 8192
  • Loading branch information
matteo-cristino authored and jaromil committed Aug 29, 2023
1 parent 7421f08 commit 46906f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lua/zencode_w3c.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local function import_did_document(doc)
-- id and @context must be always present in DID-documents
ZEN.assert(doc.id and #doc.id < 256, 'Invalid DID document: id not found')
ZEN.assert(doc['@context'], 'Invalid DID document: @context not found')
ZEN.assert(#JSON.encode(doc, 'string') < 4096, 'DID document too large')
ZEN.assert(#JSON.encode(doc, 'string') < 8192, 'DID document too large')
local did_components = strtok(doc.id, ':')
-- schme: did
ZEN.assert(did_components[1] == 'did',
Expand Down

0 comments on commit 46906f0

Please sign in to comment.