mirror of
https://git.42l.fr/neil/sncf.git
synced 2024-06-21 00:45:00 +02:00
fully restrict /apps/files from src/forward
This commit is contained in:
parent
7fbfcf485c
commit
162cdad7fe
|
@ -31,7 +31,7 @@ pub async fn forward(
|
||||||
// if check_route returns true,
|
// if check_route returns true,
|
||||||
// the user supposedly tried to access a restricted page.
|
// the user supposedly tried to access a restricted page.
|
||||||
// They get redirected to the main page.
|
// They get redirected to the main page.
|
||||||
if route == "/apps/files" {
|
if route.starts_with("/apps/files") {
|
||||||
// exception for /apps/files: always redirect to /apps/forms
|
// exception for /apps/files: always redirect to /apps/forms
|
||||||
debug(&format!("Files route blocked: {}", route));
|
debug(&format!("Files route blocked: {}", route));
|
||||||
return Ok(web_redir("/apps/forms").await.map_err(|e| {
|
return Ok(web_redir("/apps/forms").await.map_err(|e| {
|
||||||
|
|
|
@ -76,7 +76,6 @@ const BLOCKED_ROUTES: &[&str] = &[
|
||||||
"/settings",
|
"/settings",
|
||||||
"/ocs/v",
|
"/ocs/v",
|
||||||
"/remote.php",
|
"/remote.php",
|
||||||
"/apps/files",
|
|
||||||
"/core/templates/filepicker.html",
|
"/core/templates/filepicker.html",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue