Skip to content

fix(previews): reject empty folder-share path in PublicPreviewController - #63194

Open
xhon-pelushi wants to merge 1 commit into
nextcloud:masterfrom
xhon-pelushi:fix/server-59229-public-preview-validation
Open

fix(previews): reject empty folder-share path in PublicPreviewController#63194
xhon-pelushi wants to merge 1 commit into
nextcloud:masterfrom
xhon-pelushi:fix/server-59229-public-preview-validation

Conversation

@xhon-pelushi

Copy link
Copy Markdown

Summary

  • Return 400 Bad Request when a folder-share public preview request has an empty file path, before preview generation.
  • Adds a regression unit test so empty folder-share paths no longer reach folder lookup / preview code.

Fixes #59229

Test plan

  • Request a public preview for a folder share with an empty path → expect 400
  • Valid file preview under a folder share still works
  • Run the new PublicPreviewController unit test

Made with Cursor

Fixes nextcloud#59229

Signed-off-by: xhon-pelushi <xhon@pelushi.com>
@xhon-pelushi
xhon-pelushi requested a review from a team as a code owner August 12, 2026 23:28
@xhon-pelushi
xhon-pelushi requested review from come-nc, icewind1991, leftybournes and provokateurin and removed request for a team August 12, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Improper input validation in PublicPreviewController triggers internal server error

1 participant