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

fix(files_external): Catch correct exception #48345

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

marcelklehr
Copy link
Member

@marcelklehr marcelklehr commented Sep 25, 2024

SMB#getFileInfo used to throw an icewind/smb exception, but nowadays throws \OCP\Files\ForbiddenException. This fixes downstream methods to catch the new exception.

Checklist

@marcelklehr
Copy link
Member Author

/backport to stable30

@marcelklehr
Copy link
Member Author

/backport to stable29

@marcelklehr
Copy link
Member Author

/backport to stable28

@marcelklehr marcelklehr force-pushed the fix/files_external/forbidden-exception branch from 6059c15 to 45d6411 Compare September 25, 2024 07:52
@kesselb
Copy link
Contributor

kesselb commented Sep 25, 2024

Thank you, good finding 👍

Could you please update the phpdoc for getFileInfo and add

	 * @throws \OCP\Files\ForbiddenException
	 * @throws \OCP\Files\NotFoundException

@kesselb kesselb added bug 3. to review Waiting for reviews labels Sep 25, 2024
@kesselb kesselb added this to the Nextcloud 31 milestone Sep 25, 2024
@marcelklehr marcelklehr force-pushed the fix/files_external/forbidden-exception branch from 45d6411 to cd0742c Compare September 26, 2024 07:02
SMB#getFileInfo used to throw an icewind/smb exception, but nowadays throws \OCP\Files\ForbiddenException. This fixes downstream methods to catch the new exception.

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr force-pushed the fix/files_external/forbidden-exception branch from cd0742c to c8a90e9 Compare September 26, 2024 07:03
@marcelklehr marcelklehr merged commit 4febe10 into master Sep 26, 2024
175 checks passed
@marcelklehr marcelklehr deleted the fix/files_external/forbidden-exception branch September 26, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants