Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra checks for as:filetype structure values if a user decides (still don't OK?) RAW edit JSON and remove keys #329

Open
DiegoPino opened this issue Jun 13, 2024 · 0 comments
Assignees
Labels
Danger Mr Robinson Things so core to us that need extra care. Please submit automated tests? Digital Preservation Events and Subscriber Files Never old, always fresh
Milestone

Comments

@DiegoPino
Copy link
Member

DiegoPino commented Jun 13, 2024

What?

We actually depend on a sane as:document, as:image etc internal structure. For checksumming, for sorting, etc. Of course archipelago will recreate it if you delete the whole thing and is very good at managing file related info. But there is a catch. If a user goes and edits/removes important keys from there, like the UUID, the parent Key where it is stored, the name! Then our code will fail.

An example from the wild that @alliomeria shared with me relates to "sorting" files when someone removed the "name" key

I can touch the current File Persister Service and be more thorough but I can't auto fix when people intentionally edit the JSON (the variations are infinite), so I will avoid the errors but generate a BIG/LARGE
Log warning. Which also means: read your logs

@DiegoPino DiegoPino added Events and Subscriber Digital Preservation Danger Mr Robinson Things so core to us that need extra care. Please submit automated tests? Files Never old, always fresh labels Jun 13, 2024
@DiegoPino DiegoPino added this to the 1.4.0 milestone Jun 13, 2024
@DiegoPino DiegoPino self-assigned this Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Danger Mr Robinson Things so core to us that need extra care. Please submit automated tests? Digital Preservation Events and Subscriber Files Never old, always fresh
Projects
None yet
Development

No branches or pull requests

1 participant