mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-11-09 19:20:09 +01:00
fix: /partage/<slug> routing (regex delimiter + nginx location)
This commit is contained in:
1 parent
b7be93e30b
commit
a6df3c8c0e
11 files changed
+254
-288
No files matched your search
@@ -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: /');
|
||||
|
||||
Reference in new issue
Block a user