-
Notifications
You must be signed in to change notification settings - Fork 87
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: backend validation does not prevent responses on hidden fields #736
Conversation
af138bc
to
a82f694
Compare
tests/unit/backend/utils/field-validation/date-validation.spec.js
Outdated
Show resolved
Hide resolved
To address additional comments before merging
addf7ad
to
c98eab1
Compare
response.answerArray.every((arr: any) => isTableRow(arr)) | ||
) { | ||
// Check that all arrays in answerArray have the same length | ||
const subArrLength: number = response.answerArray[0].length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible that response.answerArray[0]
is undefined
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for pointing out, i've added an additional check that response.answerArray[0] must be a tableRow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving first, please address remaining comment before merging.
…use hidden field answers should not even be in the response
eae64ee
to
b455c00
Compare
Problem
Closes #732
Solution
Tests