Skip to content

fix: Improve validation for submission answers with strict type checking#3178

Merged
susnux merged 1 commit intomainfrom
fix/submit-checkboxes-with-strict-type-checking
Mar 4, 2026
Merged

fix: Improve validation for submission answers with strict type checking#3178
susnux merged 1 commit intomainfrom
fix/submit-checkboxes-with-strict-type-checking

Conversation

@Chartman123
Copy link
Collaborator

@Chartman123 Chartman123 commented Feb 21, 2026

This fixes #3114 by improving the validation for strict type checks

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 Feb 21, 2026
@Chartman123 Chartman123 self-assigned this Feb 21, 2026
@Chartman123 Chartman123 requested a review from susnux February 21, 2026 14:44
@Chartman123 Chartman123 force-pushed the fix/submit-checkboxes-with-strict-type-checking branch 2 times, most recently from 237c39d to c7ed599 Compare February 21, 2026 14:52
@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

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

📢 Thoughts on this report? Let us know!

@Chartman123
Copy link
Collaborator Author

@gerbsen could you please test this fix?

@Chartman123
Copy link
Collaborator Author

/backport to stable5.2

@gerbsen
Copy link

gerbsen commented Feb 22, 2026

could you please test this fix?

Okay, I will. How would I do that? Going into the container and copy&replace the existing code?

@Chartman123
Copy link
Collaborator Author

Okay, I will. How would I do that? Going into the container and copy&replace the existing code?

Yes :)

Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
@Chartman123 Chartman123 force-pushed the fix/submit-checkboxes-with-strict-type-checking branch from c7ed599 to a82d9fb Compare February 26, 2026 10:56
@Chartman123
Copy link
Collaborator Author

@gerbsen could you already test it?

@gerbsen
Copy link

gerbsen commented Feb 27, 2026

Not yet, can only do this at the weekends. But will do this tomorrow. Sorry for the wait.

@gerbsen
Copy link

gerbsen commented Mar 4, 2026

I was now finally able to test this. I mounted the file via volume in my compose file. PHP_HARDENING: true was set.

/home/deploy/SubmissionService.php:/nextcloud/apps2/forms/lib/Service/SubmissionService.php

>> submission of forms without any issue! on NEXTCLOUD_VERSION=32.0.6 thank you! for the patience and the bugfix!

@susnux susnux merged commit ae3e208 into main Mar 4, 2026
56 checks passed
@susnux susnux deleted the fix/submit-checkboxes-with-strict-type-checking branch March 4, 2026 17:43
@susnux
Copy link
Collaborator

susnux commented Mar 4, 2026

/backport to stable5.2

@backportbot backportbot bot added backport-request Pending backport by the backport-bot and removed backport-request Pending backport by the backport-bot labels Mar 4, 2026
@backportbot
Copy link

backportbot bot commented Mar 4, 2026

The backport to stable5.2 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable5.2
git pull origin stable5.2

# Create the new backport branch
git checkout -b backport/3178/stable5.2

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick a82d9fba

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/3178/stable5.2

Error: Failed to create pull request: Validation Failed: {"resource":"PullRequest","code":"custom","message":"A pull request already exists for nextcloud:backport/3178/stable5.2."} - https://docs.github.com/rest/pulls/pulls#create-a-pull-request


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

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 Something isn't working feature: 📝 submitting responses php PHP related ticket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Form with checkbox questions can't be submitted without 400 error

3 participants