A CV that lists web skills is no longer refused as a dangerous PDF - #2195
Merged
Conversation
Das PDF-Tor suchte die Namen /JavaScript, /OpenAction und /EmbeddedFile im ganzen Dokument, also auch im Seitentext, und wies deshalb einen Lebenslauf mit "HTML/CSS/JavaScript" als Programm ab, während pdfinfo JavaScript: no sagte. Die beiden Fragen, die poppler aus der geparsten Struktur beantwortet, stellt der Byte-Scan jetzt gar nicht mehr: gemessen erkennt pdfinfo ein Skript an jeder Aktionsstelle und pdfdetach jede angehängte Datei. Die vier übrigen Namen liest er aus der PDF-Syntax statt aus dem Text, Zeichenketten, Hex-Zeichenketten und Kommentare werden vorher geleert. Geleert wird aber kein Bereich, der ein << oder >> enthält, denn in einem Objekt-Stream liest ein Leser jedes Objekt an der Stelle, die dessen eigene Tabelle nennt, und eine Klammer im einen Objekt könnte sonst den Katalog im nächsten verstecken. Diesen Text hat ein KI-Agent in meinem Namen geschrieben. Ich weiß, dass das problematisch ist. Claude-Session: https://claude.ai/code/session_013VnEsuePUe2CB2QvDcshcp
Ein blinder Prüfer fand fünf Konstrukte, die das Tor annahm und speicherte: ein Öffnungsskript auf Seite 2, 3 und 20, und eine JavaScript-Aktion, die hinter /Next an einem Ziel hängt, als Dictionary wie als Array. Gemessen liest pdfinfo ohne Seitenbereich nur Seite 1, folgt keiner /Next-Kette und meldet je nach Version Verschiedenes; also bekommt der Aufruf -f 1 -l 999999, /JavaScript steht wieder neben ihm im Byte-Scan, und eine Ausgabe ohne die Felder, die wir lesen, gilt als keine Antwort statt als Unbedenklichkeitsbescheinigung. Dazu zwei Fehler dieser Änderung selbst: ein einzelnes < als letztes Byte ließ den Ausblende-Durchgang auf derselben Stelle kreisen, und statt einer Abkürzung, die weniger ausblendet und dabei genau den Lebenslauf wieder abwies, trägt der Durchgang jetzt eine Obergrenze in gelesenen Bytes. Diesen Text hat ein KI-Agent in meinem Namen geschrieben. Ich weiß, dass das problematisch ist. Claude-Session: https://claude.ai/code/session_013VnEsuePUe2CB2QvDcshcp
wintermeyer
force-pushed
the
claude/pdf-gate-structure-2136
branch
from
September 11, 2026 16:45
8446574 to
37f805c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A CV whose page reads "HTML/CSS/JavaScript" was refused as a dangerous PDF: the
byte scan could not tell a name from a word.
Vutuv.Uploads.PdfGatenow blanks strings, hex strings and comments before itlooks for a name. A range spanning a
<<or>>is never blanked: inside anobject stream a reader picks objects out at recorded offsets, so a
(in oneand a
)in the next could otherwise hide a catalog. It carries a workallowance, because a file can make it re-read itself.
Which names are looked for did not change, and a first version that dropped
/JavaScriptis why: measured,pdfinfowithout a page range reads page 1only, never follows an
/OpenAction's/Nextchain, and reports differentthings on different builds. It now gets
-f 1 -l 999999, and an answer missingthe fields we read counts as no answer.
Attacks, corpus counts and the invariant: in the issue.
Closes #2136
https://claude.ai/code/session_013VnEsuePUe2CB2QvDcshcp