Conversation
7f68e07 to
cd76fee
Compare
75c0f3c to
16c324d
Compare
16c4c20 to
429482d
Compare
… one's own build and queue
There was a problem hiding this comment.
🟡 Malformed crash bodies remain downloadable
When an incident report retains a valid header but has a malformed body, isSameReport accepts it. parseCrashReport only gates incidentless occurrences, so the detail endpoint returns corrupt raw data without reportError.
(Refers to this code)
Learn more
An IPS report has a JSON header followed by a JSON body. The header can remain valid while the body is truncated or otherwise invalid. For occurrences with an incident ID, isSameReport returns immediately after comparing that header, so it never verifies the body. The route then exposes the malformed file as a valid raw report and leaves reportError null.
Example: The stored occurrence has incident ID INC-1. Its file now contains a valid INC-1 header followed by { "pid":. parseIpsHeader succeeds, the incident IDs match, and the corrupt file is returned instead of the fallback summary error.
Recommended fix: Require parseCrashReport(raw) to succeed before either identity comparison. Then compare incident IDs when present, otherwise compare PID and capture time. Add a route test using a valid header and malformed body.
Was this helpful? React with 👍 or 👎 to provide feedback.
Why
/crasheshad no reader. You could curl it, but nothing in the preview told you the app had died.How
.ipsif you want to open it elsewhereTest Plan
crash-ui.mp4