fully restrict /apps/files from src/forward

This commit is contained in:
neil 2021-04-13 23:03:09 +02:00
parent 7fbfcf485c
commit 162cdad7fe
2 changed files with 1 additions and 2 deletions

View File

@ -31,7 +31,7 @@ pub async fn forward(
// if check_route returns true,
// the user supposedly tried to access a restricted 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
debug(&format!("Files route blocked: {}", route));
return Ok(web_redir("/apps/forms").await.map_err(|e| {

View File

@ -76,7 +76,6 @@ const BLOCKED_ROUTES: &[&str] = &[
"/settings",
"/ocs/v",
"/remote.php",
"/apps/files",
"/core/templates/filepicker.html",
];