Skip to content

v4.0-beta.8 — Safety pass for PowerPoint and Word; rejected slides say what would work

Pre-release
Pre-release

Choose a tag to compare

@dvejsada dvejsada released this 23 Sep 07:33
· 38 commits to master since this release
8bd03dd

PowerPoint and Word get a safety pass: a short title can no longer freeze the server, links only go where a link should, and five ways a deck could come out broken or not come out at all are closed. A rejected slide now also tells the model what that slide type does take.

🛡 Safety (#198)

A 67-character title could freeze the whole server for 1.5 seconds, and each two more characters multiplied that. Some unclosed **bold text made the inline-markdown parser, which Word and PowerPoint share, try an exponential number of parses. It blocked everything else on the server while it ran, including health checks. Fixed in the grammar: a 20,000-character input now takes about 40 ms.

Links only become clickable for http, https, mailto and tel. Any other target became a clickable link in the document, including file: and network paths, custom protocol handlers and javascript:. Office would open it on a reader's click. Now such a link keeps its text and is reported as link_refused, in both Word and PowerPoint.

The admin UI with no password set accepted a forged login. With ADMIN_ENABLED set but no ADMIN_PASSWORD or API_KEY, the admin UI signed its session cookies with a key anyone can read in the source. Now it is locked in that state: every page redirects to login, and no password opens it.

One table merge could use up the server's memory. Merge spans have no upper limit, and each merge was expanded cell by cell before its size was checked. The size check now comes first.

Two input parsers slowed down sharply on long runs of spaces: 4 s and 1.6 s at 20,000 characters, and the first one ran where it blocked the server. Both are rewritten and give the same results.

🩹 PowerPoint: decks that broke or never arrived

  • Table colours dark1, dark2, light1 and light2 produced a file PowerPoint would offer to repair. They are now written correctly.
  • Data labels (data_labels: true) were placed "outside end" on every chart type. PowerPoint only allows that on bar, column and pie charts. Other chart types now keep their default label position.
  • One control character failed the whole deck. A pasted vertical tab or similar character in the footer, a section title or chart data caused this. Such characters are now removed and reported once as control_chars_removed (info). Vertical tabs become line breaks.
  • NaN or Infinity in chart values, scatter points, column widths or positions failed the deck with an error that named no field. They are now rejected up front, and the error names the field.
  • A bug in the server was reported as your invalid input. Internal errors are now reported as server errors and logged with their traceback.

🧭 A rejected slide says what would work (#197)

The slide schema is strict, so one field on the wrong slide type fails the whole call. The error used to name the mistake but not the fix. It now does both:

slide 1 -> subtitle: 'subtitle' is not a field of a 'section' slide (it takes: title, notes, layout); 'subtitle' belongs to: title, closing.

An error on a slide's title field also names that field again; before, it named no field at all.

Admin: a section's Overview and dashboard now count templates declared in the master YAML. Before, a hand-written template showed as Live on the Templates tab but counted as 0 on the Overview.

Check on upgrade

  • Links without a scheme stop being clickable. [site](example.com) now shows "site" as plain text with a link_refused warning. Before, it made a link that Office opened as a file next to the document. Write https://example.com.
  • Admin UI without a password is locked. It could never log you in before, but it did load. Set ADMIN_PASSWORD (or API_KEY) before enabling it.
  • A vertical tab in slide text becomes a line break. In a bullet body, that can start a new line.
  • New warning codes: link_refused (warning, in Word and PowerPoint) and control_chars_removed (info, in PowerPoint).
docker pull georgx22/mcp-office-docs:v4.0-beta.8

Prerelease, so the image does not move latest.

Full changelog: v4.0-beta.7...v4.0-beta.8