mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
- fix: 403 on /language-autre-fragment.php — add explicit nginx location block
The nginx catch-all blocked direct access
to all PHP files except /index.php and files inside /admin/.
language-autre-fragment.php lives at the public root and is POSTed to by
HTMX from both the admin edit form and the partage form. Added an explicit
fastcgi block so it is executed
rather than denied.
- fix: replace .php-suffixed public URLs blocked by nginx catch-all
Audit of all client-facing PHP URL references against nginx routing:
- fetch('/request-access.php') in tfe.php -> '/request-access'
(clean URL already routed by Dispatcher)
- /media.php?path= in form.php (x2) and admin/recapitulatif.php -> /media?path=
(nginx only has location = /media, no location for /media.php)
All these .php-suffixed URLs hit the nginx catch-all
location ~ \.php$ { deny all; }
which takes precedence over location / { try_files ... } for regex matches.
18 lines
543 B
PHP
18 lines
543 B
PHP
<?php
|
|
/**
|
|
* language-autre-fragment.php (admin)
|
|
*
|
|
* HTMX fragment: returns the "Autre(s) langue(s)" input row.
|
|
* Called from the shared form partial when a language checkbox changes.
|
|
*
|
|
* Expected POST:
|
|
* languages[] — selected language IDs (may be absent)
|
|
* language_autre — current free-text value (for repopulation)
|
|
*/
|
|
require_once __DIR__ . '/../../bootstrap.php';
|
|
require_once __DIR__ . '/../../src/AdminAuth.php';
|
|
|
|
AdminAuth::requireLogin();
|
|
|
|
require_once APP_ROOT . '/public/partage/language-autre-fragment.php';
|