mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	fix(anonymization): full anonymization not redacting attachment titles
This commit is contained in:
		
							parent
							
								
									afac983687
								
							
						
					
					
						commit
						b4c74af662
					
				@ -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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -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});
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user