Skip to content

A CV that mentions JavaScript is refused as a dangerous PDF #2136

Description

@wintermeyer

The PDF gate that shipped with #2104 inflates a file's streams and looks for the token names that make a PDF dangerous, but it reads the page text along with the structure, so a document whose visible words contain /JavaScript, /OpenAction or /EmbeddedFile is refused. Two macOS-produced PDFs whose text read "TypeScript/JavaScript" were both refused as :javascript while pdfinfo said JavaScript: no. The scan should decide on the document structure and not on what the pages say.

Nobody notices today, because ATTACHMENT_UPLOADERS defaults to admins — but this has to be narrowed before files are opened to members, and a CV listing web skills is exactly the file somebody would attach first.

Where: Vutuv.Uploads.PdfGate.

An AI agent wrote this text in my name. I know that is problematic.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions