You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(files_sharing): validate input in PublicPreviewController#getPreview
Return 400 Bad Request when the file parameter is empty and the shared
node is a folder, instead of passing the folder itself to getPreview
which triggers an internal server error.
Also rename the local variable to $fileNode to prevent the catch block
from calling getMimeType() on the original string parameter when
get() throws NotFoundException.
Fixes#59229
Assisted-by: ClaudeCode:claude-opus-4-6
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
# Conflicts:
# apps/files_sharing/lib/Controller/PublicPreviewController.php
# Conflicts:
# apps/files_sharing/lib/Controller/PublicPreviewController.php
"description": "For shares pointing to a single file, the file parameter is ignored. For folder shares, file must be the relative path to a file inside the shared folder.",
1478
1479
"tags": [
1479
1480
"public_preview"
1480
1481
],
@@ -1500,7 +1501,7 @@
1500
1501
{
1501
1502
"name": "file",
1502
1503
"in": "query",
1503
-
"description": "File in the share",
1504
+
"description": "Relative path to a file inside a shared folder; ignored for single-file shares",
"description": "For shares pointing to a single file, the file parameter is ignored. For folder shares, file must be the relative path to a file inside the shared folder.",
26404
26405
"tags": [
26405
26406
"files_sharing/public_preview"
26406
26407
],
@@ -26426,7 +26427,7 @@
26426
26427
{
26427
26428
"name": "file",
26428
26429
"in": "query",
26429
-
"description": "File in the share",
26430
+
"description": "Relative path to a file inside a shared folder; ignored for single-file shares",
0 commit comments