fix(anonymization): full anonymization not redacting attachment titles

This commit is contained in:
Elian Doran 2025-04-16 14:29:04 +03:00
parent afac983687
commit b4c74af662
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,7 @@
* [config.Session.cookieMaxAge is ignored](https://github.com/TriliumNext/Notes/issues/1709) by @pano9000 * [config.Session.cookieMaxAge is ignored](https://github.com/TriliumNext/Notes/issues/1709) by @pano9000
* [Return correct HTTP status code on failed login attempts instead of 200](https://github.com/TriliumNext/Notes/issues/1707) by @pano9000 * [Return correct HTTP status code on failed login attempts instead of 200](https://github.com/TriliumNext/Notes/issues/1707) by @pano9000
* [Calendar stops displaying notes after adding a Day Note](https://github.com/TriliumNext/Notes/issues/1705) * [Calendar stops displaying notes after adding a Day Note](https://github.com/TriliumNext/Notes/issues/1705)
* Full anonymization not redacting attachment titles.
## ✨ Improvements ## ✨ Improvements

View File

@ -13,11 +13,12 @@ function getFullAnonymizationScript() {
.map((attr) => `'${attr.name}'`) .map((attr) => `'${attr.name}'`)
.join(", "); .join(", ");
const anonymizeScript = ` const anonymizeScript = /*sql*/`\
UPDATE etapi_tokens SET tokenHash = 'API token hash value'; UPDATE etapi_tokens SET tokenHash = 'API token hash value';
UPDATE notes SET title = 'title' WHERE title NOT IN ('root', '_hidden', '_share'); UPDATE notes SET title = 'title' WHERE title NOT IN ('root', '_hidden', '_share');
UPDATE blobs SET content = 'text' WHERE content IS NOT NULL; UPDATE blobs SET content = 'text' WHERE content IS NOT NULL;
UPDATE revisions SET title = 'title'; UPDATE revisions SET title = 'title';
UPDATE attachments SET title = 'title';
UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label' AND name NOT IN(${builtinAttrNames}); UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label' AND name NOT IN(${builtinAttrNames});
UPDATE attributes SET name = 'name' WHERE type = 'relation' AND name NOT IN (${builtinAttrNames}); UPDATE attributes SET name = 'name' WHERE type = 'relation' AND name NOT IN (${builtinAttrNames});