Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(core): remove interception at sync level
Elian Doran9fc35eee1d39
diff --git a/packages/trilium-core/src/services/sync_update.ts b/packages/trilium-core/src/services/sync_update.tsindex 9193a5b039..233ceba514 100644--- a/packages/trilium-core/src/services/sync_update.ts+++ b/packages/trilium-core/src/services/sync_update.ts@@ -1,6 +1,4 @@import type { EntityChange, EntityChangeRecord, EntityRow } from "@triliumnext/commons";-import attributeService from "./attributes.js";-import { isScriptingEnabled } from "./scripting_guard.js";import entityChangesService from "./entity_changes.js";import { getLog } from "./log.js";@@ -95,18 +93,6 @@ function updateNormalEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow |preProcessContent(remoteEC, remoteEntityRow);- // When backend scripting is disabled, prefix dangerous attributes with 'disabled:'- // Same pattern as safeImport in attributes.ts- if (remoteEC.entityName === "attributes" && !isScriptingEnabled()) {- const attrRow = remoteEntityRow as Record<string, unknown>;- if (typeof attrRow.type === "string" && typeof attrRow.name === "string"- && !attrRow.isDeleted- && attributeService.isAttributeDangerous(attrRow.type, attrRow.name)) {- getLog().info(`Sync: disabling dangerous attribute '${attrRow.name}' (backend scripting is disabled)`);- attrRow.name = `disabled:${attrRow.name}`;- }- }-getSql().replace(remoteEC.entityName, remoteEntityRow);updateContext.updated[remoteEC.entityName] = updateContext.updated[remoteEC.entityName] || [];