idstack
idstack copied to clipboard
course-import .docx parsing: reject DOCTYPE before ElementTree
skills/course-import/SKILL.md.tmpl (around line 291) parses word/document.xml with ElementTree. The macOS system Python 3.9.6 bundles expat 2.2.8, which does not have the billion-laughs protection of later releases. A crafted .docx can therefore hang the session.
Done when the block refuses a document that contains <!DOCTYPE or <!ENTITY before it parses, and a test in test/test-skill-shell-zsh.sh covers this.
Found in the pre-share reliability review.