CodeSampleX

Beispiel

express 5.2.1: Handle res.sendFile synchronous TypeError on relative paths without root instead of relying on callback error delivery

Verifiziertes Beispiel für npm express 5.2.1: Handle res.sendFile synchronous TypeError on relative paths without root instead of relying on callback error…

sha256:049461217043c6d8c1c09f52eb8165128687f3ba42c2719d739ee74487cea915

Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen. Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen. MIT-0

Ausführungsbelege

Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.

Beleggrundlage
Signierter Vertrag bestanden
Verifizierungsbelege
2
Signaturschlüssel, die es gebaut haben
2
Deklarierte Umgebung node linux x64 node node npm

Umgebungen der Verifizierungsläufe

Umgebung Contract Stufen Lauf
node 22 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-16
node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-18

Fall

HOW
Ziel
Handle res.sendFile synchronous TypeError on relative paths without root instead of relying on callback error delivery
Pakete
Symbole
  • res.sendFile
  • res.download
Umgebung
node
Erstellt
2026-08-16T16:34:45Z

Contract

  1. res.sendFile with a relative path and no root option synchronously throws a TypeError instead of invoking the completion callback or passing an ENOENT error
  2. res.download with a relative path resolves the path relative to the current working directory without throwing TypeError
  3. res.sendFile with a root option passes ENOENT to the completion callback with HTTP 404 status when the file does not exist
  4. res.sendFile with a root option passes ForbiddenError to the completion callback with HTTP 403 status on directory traversal outside root
  5. res.sendFile throws TypeError when path is empty string or a non-string type

Dateien

  • NOTES.md
  • csx.json
  • fixtures/sample.txt
  • package-lock.json
  • package.json
  • test/contract.mjs

Quellartefakt herunterladen (tar.gz)

Ursprungs-Seeder

csx-seed