Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trash bin: fix exception triggered if no correct fileId is provided. #18728

Merged
merged 1 commit into from
Jan 8, 2020

Conversation

simonspa
Copy link
Contributor

@simonspa simonspa commented Jan 7, 2020

Somehow in some installations the trash bin preview controller is called with incorrect $fileId. By assigning a default value and catching the default, a BAD_REQUEST can be returned instead. This behavior is taken from the "normal" files preview controller.

This fixes #17115

@kesselb
Copy link
Contributor

kesselb commented Jan 7, 2020

Thanks 👍

Could you try to rebase your patch with the latest changes from nextcloud/server? https://github.com/simonspa/server/tree/trashbin_exception is some commits behind hence the CI is failing. I'm usually do it like this: https://thoughtbot.com/blog/keeping-a-github-fork-updated

This fixes nextcloud#17115

Signed-off-by: Simon Spannagel <simon.spannagel@cern.ch>
@simonspa simonspa force-pushed the trashbin_exception branch from d9913ed to b3ad27f Compare January 7, 2020 22:47
@simonspa
Copy link
Contributor Author

simonspa commented Jan 8, 2020

@kesselb I somehow forgot to update my fork before adding the fix. Anyway, rebased now. Somehow some of the CI tests still fail. Do I need to take care of something else?

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively we could have made it nullable, but fine by me 👍

Thanks :)

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jan 8, 2020
@rullzer rullzer merged commit ada25ab into nextcloud:master Jan 8, 2020
@welcome
Copy link

welcome bot commented Jan 8, 2020

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
Most developers hang out on IRC. So join #nextcloud-dev on Freenode for a chat!

@rullzer rullzer mentioned this pull request Jan 8, 2020
1 task
@simonspa
Copy link
Contributor Author

simonspa commented Jan 8, 2020

Maybe this could also be backported for 17.0.3?

@rullzer
Copy link
Member

rullzer commented Jan 8, 2020

/backport to stable17

@backportbot-nextcloud
Copy link

backport to stable17 in #18734

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug
Projects
None yet
4 participants