Skip to content

Server: Copy the objects along the paths of signed asset files - #389

Merged
lehni merged 1 commit into
mainfrom
fix/388
Oct 17, 2026
Merged

lehni merged 1 commit into
mainfrom
fix/388

Conversation

@lehni

@lehni lehni commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #388.

toJSON() signs asset files by writing signed copies into the JSON. With cloneObjectAttributes = false, nested objects of JSON columns are shared between the record and its JSON, so this replaced the record's own AssetFile instances with the signed plain copies.

_mapAssetFiles() now copies each object and array along a file's path once, then writes the signed file into the copy. The record keeps its own objects and files. Only containers that lead to files are copied.

Test: the wildcard signing test also checks that the record's files remain unsigned AssetFiles after toJSON(). It fails without the fix.

- Nested objects of JSON columns are shared between a record and its JSON,
  so signing replaced the record's own file objects (#388)
@lehni
lehni merged commit f6d9ad1 into main Oct 17, 2026
8 checks passed
@lehni
lehni deleted the fix/388 branch October 17, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server: toJSON() replaces file objects in object columns with signed copies

1 participant