mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
cleanup modal: list stale files to remove; storage restructure: documents/ → {objet}/
This commit is contained in:
@@ -51,8 +51,8 @@ if (!$thesisId || $filePath === '') {
|
||||
relinkError(400, 'Paramètres invalides (thesis_id + file_path requis).');
|
||||
}
|
||||
|
||||
// Security: only allow paths under documents/ or theses/
|
||||
if (!preg_match('#^(documents|theses)/#', $filePath)) {
|
||||
// Security: only allow paths under tfe/ these/ frart/ documents/ or theses/
|
||||
if (!preg_match('#^(tfe|these|frart|documents|theses)/#', $filePath)) {
|
||||
relinkError(403, 'Chemin de fichier non autorisé.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user