mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
The resolve()+startsWith containment check was correct but CodeQL did not recognize it. Apply path.basename() to the name in resolveWithinPreviewDir -- a sanitizer CodeQL recognizes -- so every id-derived preview path is provably a single filename inside the preview dir. Behaviour is unchanged for valid ids (already charset-validated); containment check kept as a backstop.