fix: Improve validation for submission answers with strict type checking#3178
Open
Chartman123 wants to merge 1 commit intomainfrom
Open
fix: Improve validation for submission answers with strict type checking#3178Chartman123 wants to merge 1 commit intomainfrom
Chartman123 wants to merge 1 commit intomainfrom
Conversation
77adf9f to
237c39d
Compare
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
237c39d to
c7ed599
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Collaborator
Author
|
@gerbsen could you please test this fix? |
susnux
reviewed
Feb 21, 2026
|
|
||
| // Check if all answers are within the possible options | ||
| if (in_array($question['type'], Constants::ANSWER_TYPES_PREDEFINED) && empty($question['extraSettings']['allowOtherAnswer'])) { | ||
| // Normalize option IDs once for consistent comparison (DB may return ints, request may send strings) |
Collaborator
There was a problem hiding this comment.
request may send strings
Do we do that? 👀
Collaborator
Author
There was a problem hiding this comment.
Yes, "other" answers only consist of strings...
susnux
approved these changes
Feb 21, 2026
Collaborator
Author
|
/backport to stable5.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #3114 by improving the validation for strict type checks
Signed-off-by: Christian Hartmann chris-hartmann@gmx.de