Files
vectorcraft/crates/engine
dotCooCoo 72c4875990 Scripts: a script cannot change the state an XMPFile keeps
An XMPFile kept its path, open flags and pending packet in writable,
configurable properties, so a script could assign a packet to a file
opened for reading and closeFile wrote it without checking the update
flag or reading the packet.

- The properties holding an XMPFile's state are not writable,
  enumerable or configurable, and the pending packet is one of them from
  the start.
- The XMPMeta docs say that only the namespaces a packet's names use
  are registered, which is what reading a packet does.

Test: a_script_cannot_change_the_state_of_an_xmp_file in
crates/engine/src/tests/script_xmp.rs. Docs: docs/mcp.md.
2026-11-22 10:44:46 -08:00
..