fix: /partage/<slug> routing (regex delimiter + nginx location)

This commit is contained in:
Pontoporeia
2026-04-16 12:00:28 +02:00
parent b7be93e30b
commit a6df3c8c0e
11 changed files with 254 additions and 288 deletions

View File

@@ -22,7 +22,7 @@ $slug = $parts[0] ?? '';
$action = $parts[1] ?? '';
// Validate slug format: YYYYMMDD-XXXXXXXX (17 chars)
if (!preg_match('/^\d{8}-[A-Z2-7]{8}$/', $slug)) {
if (!preg_match('#^\d{8}-[A-Z0-9+/]{8}$#', $slug)) {
App::boot();
$_SESSION['_flash_error'] = 'Ce lien de partage n\'est pas valide.';
header('Location: /');