You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rename_schema_field rekeys Core/System-protected fields with no protection check (same guard bypass) #2195
rename_schema_field validates only that the source field exists and the destination doesn't, never its protection level, so update_schema's rename_fields can rekey a Core/System-protected field and migrate all node data to the new key, corrupting a core type.
Failure scenario
handle_update_schema's Phase-0 namespace check (schema/mod.rs:716-721) only rejects renaming TO a bare name on a core type; renaming a Core field to a prefixed name is allowed. Calling update_schema with {"schema_id":"task","rename_fields":[{"from":"status","to":"custom:status"}]} passes that check, then rename_schema_field (schema.rs:544) performs no SchemaProtectionLevel check and migrates every task node's status property data to custom:status, rewriting the stored schema. The hardcoded TaskNodeBehavior and the frontend read properties.task.status, which is now missing, breaking status rendering/validation across all existing tasks. Same root cause as the remove_fields gap: the schema-mutation path never consults protection levels and never calls can_modify_field. A fix that only guards removal leaves this rename path independently exploitable.
Fixed in #2304: added a protection-level guard (checked against SchemaProtectionLevel via can_delete_field/can_modify_field) to handle_update_schema's Phase 0 and to the NodeService::rename_schema_field/update_schema_field_friendly_name primitives, so a Core/System-protected field can no longer be removed, renamed, or relabeled through update_schema. Also moved rename-destination grammar validation ahead of the migration/persist step, so a malformed destination name is rejected before anything is written rather than after. Regression tests cover the removal, rename, friendly-name-relabel, and grammar-before-persist scenarios described here. PR is open for review, not yet merged.
Fixed in PR #2304 (merged 7528411a), part of the same cluster as #2194. Closing — GitHub's auto-close only picked up the first issue in the PR's comma-separated closing list, closing the rest manually.
Activity
mstomar125 commentedon Aug 27, 2026
Fixed in #2304: added a protection-level guard (checked against
SchemaProtectionLevelviacan_delete_field/can_modify_field) tohandle_update_schema's Phase 0 and to theNodeService::rename_schema_field/update_schema_field_friendly_nameprimitives, so a Core/System-protected field can no longer be removed, renamed, or relabeled throughupdate_schema. Also moved rename-destination grammar validation ahead of the migration/persist step, so a malformed destination name is rejected before anything is written rather than after. Regression tests cover the removal, rename, friendly-name-relabel, and grammar-before-persist scenarios described here. PR is open for review, not yet merged.Enforce Core/System field protection on update_schema removes and ren…
mstomar125 commentedon Aug 27, 2026
Fixed in PR #2304 (merged
7528411a), part of the same cluster as #2194. Closing — GitHub's auto-close only picked up the first issue in the PR's comma-separated closing list, closing the rest manually.