Changeset c9d48fc in Klonkt
- Timestamp:
- 06/22/2026 01:58:08 PM (3 months ago)
- Branches:
- main
- Children:
- 3bb8719
- Parents:
- 17197a9
- File:
-
- 1 edited
-
src/routes/download.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/download.js
r17197a9 rc9d48fc 44 44 function dlTrack(siteId, id) { 45 45 return db.prepare( 46 `SELECT t.id, t.title, t.artist, t.cover_url, m.storage_path 46 `SELECT t.id, t.title, t.artist, t.cover_url, m.storage_path, m.filename 47 47 FROM audio_tracks t JOIN media m ON m.id = t.media_id 48 48 WHERE t.id = ? AND t.site_id = ? AND t.downloadable = 1` … … 129 129 return res.status(403).send('Laat eerst je e-mailadres achter om te downloaden.'); 130 130 } 131 const sp = track.storage_path; 131 // De speelbare/te-downloaden file = de KALE filename (storage_path is een 132 // absoluut pad → faalt de slash-guard). Zelfde aanpak als /audio/stream. 133 const sp = track.filename; 132 134 if (!sp || sp.includes('/') || sp.includes('\\') || sp.includes('..')) return res.status(400).send('Bad path'); 133 135 const filePath = path.join(AUDIO_DIR, sp);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)