Skip to content

Add a separate route for submitting file upload answers - #2352

Draft
stephencdaly wants to merge 1 commit into
mainfrom
add-separate-route-for-submitting-file-upload-answers
Draft

stephencdaly wants to merge 1 commit into
mainfrom
add-separate-route-for-submitting-file-upload-answers

Conversation

@stephencdaly

@stephencdaly stephencdaly commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Do not merge until the WAF rules have been updated to allow large request bodies for the new file upload route (as well as the save question route)

What problem does this pull request solve?

We need to be able to exempy file upload requests from particular WAF rules:

  • the file size rule so requests can include files >8KB in size
  • the XSS rule, so that files that contain XML, such as PDFs are not blocked.

So that we don't need to allow these rules for submitting all answer types, make it so that file upload requests are submitted to a dedicated route.

For now, this still allows file uploads to be submitted to the standard save question route so we don't cause issues for users currently filling out forms, but this will be changed in a separate deployment.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

We need to be able to exempy file upload requests from particular
WAF rules:
- the file size rule so requests can include files >8KB in size
- the XSS rule, so that files that contain XML, such as PDFs are not
blocked.

So that we don't need to allow these rules for submitting all answer
types, make it so that file upload requests are submitted to a
dedicated route.

For now, this still allows file uploads to be submitted to the
standard save question route so we don't cause issues for users
currently filling out forms, but this will be changed in a separate
deployment.

Co-Authored-By: Claude
@github-actions

Copy link
Copy Markdown
Contributor

🎉 A review copy of this PR has been deployed! It is made of up two components

  1. A review copy of forms-runner
  2. A production copy of forms-admin

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant