Skip to content

fix(export): Handle exceptions when reading file content and ignore whitespace-only files#3214

Open
Chartman123 wants to merge 1 commit intomainfrom
fix/s3_export
Open

fix(export): Handle exceptions when reading file content and ignore whitespace-only files#3214
Chartman123 wants to merge 1 commit intomainfrom
fix/s3_export

Conversation

@Chartman123
Copy link
Collaborator

This fixes #3175 by adding a check if the file really has content.

Signed-off-by: Christian Hartmann chris-hartmann@gmx.de

@Chartman123 Chartman123 added bug Something isn't working php PHP related ticket 3. to review Waiting for reviews labels Mar 9, 2026
@Chartman123 Chartman123 self-assigned this Mar 9, 2026
@Chartman123 Chartman123 requested a review from susnux March 9, 2026 22:50
@Chartman123
Copy link
Collaborator Author

@sheyaln could you please try this fix? I don't have access to an instance that uses S3 storage

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/Service/SubmissionService.php 57.14% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Chartman123
Copy link
Collaborator Author

/backport to stable5.2

@backportbot backportbot bot added the backport-request Pending backport by the backport-bot label Mar 10, 2026
@sheyaln
Copy link

sheyaln commented Mar 10, 2026

@sheyaln could you please try this fix? I don't have access to an instance that uses S3 storage

Apologies, how do you recommend I test this fix?

@Chartman123
Copy link
Collaborator Author

You can go to the Forms app directory on your server and manually patch the lib/service/SubmissionService.php file with the changes from this PR. Make a backup of the original file. You can also apply the patch file https://github.com/nextcloud/forms/pull/3214.patch

Copy link
Collaborator

@susnux susnux left a comment

Choose a reason for hiding this comment

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

Nice, just to small comments

…hitespace-only files

Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
@Chartman123
Copy link
Collaborator Author

Nice, just to small comments

@susnux thanks for the review, comments are resolved now :)

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 backport-request Pending backport by the backport-bot bug Something isn't working feature: 📊 responses & statistics php PHP related ticket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to link results to sheets

3 participants