{"version":"2.1.223","anchor":"ide-diagnostics-attachments-are-validated-before-replay","canonical_anchor":"ide-diagnostics-attachments-are-validated-before-replay","heading":"IDE diagnostics attachments are validated before replay","tier":"notice","area":"Elsewhere","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.223\/e\/ide-diagnostics-attachments-are-validated-before-replay","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.223","markdown":"### IDE diagnostics attachments are validated before replay\n\nEditor diagnostics restored from saved sessions are checked for junk before being shown, so bad data can't garble your screen.\n\n**What**\n\nDiagnostics restored from a replayed attachment are now sanitized, so a malformed or crafted payload cannot reach the renderer.\n\n**Details**\n\n- a new `sanitizeDiagnosticFiles` static drops non-array payloads and logs once per payload shape\n- file entries are dropped unless they have a string `uri` and an array of diagnostics; individual diagnostics are dropped unless they have a string message and numeric range start line and character\n- missing ranges are normalized, and the count of dropped files and diagnostics is logged once per payload\n- severity strings map through an explicit table (error, warning, info, information, hint), and `getSeveritySymbol` now uses `Object.hasOwn` and rejects non-string input, so a crafted severity cannot reach an inherited property\n\n**Evidence**\n\n`Dropped a ${o} diagnostics files payload from a replayed attachment`, `diagnostics files payload from a replayed attachment`\n\n- Area: Elsewhere\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 0\/5"}