Skip to content

Adjust form-action of Backend CSP - #2197

Merged
matthew-white merged 1 commit into
nextfrom
csp-form
Sep 4, 2026
Merged

Adjust form-action of Backend CSP#2197
matthew-white merged 1 commit into
nextfrom
csp-form

Conversation

@matthew-white

Copy link
Copy Markdown
Member

This PR addresses the latest aspect of #2080.

What has been done to verify that this works as intended?

Nothing much yet. It's not an error for me locally, since I don't believe the development nginx enforces a CSP. I updated a test of the CSP. I'm planning to try the repro steps again on staging once this PR is merged.

Why is this the best possible solution? Were any other approaches considered?

I've added thoughts about this approach at #2080 (comment). Ultimately, I would prefer to adjust the implementation in Frontend; I can file an issue about that. However, that'll be a little harder than the one-line change here. I don't think it's important enough to spend additional cycles on it before regression testing.

How does this change impact users? Describe intentional behavior changes from code updates. What are the regression risks?

Users can start submitting HTML forms from their Backend endpoints like we are? Hopefully users don't need to take such an approach. 馃槄

@matthew-white

Copy link
Copy Markdown
Member Author

How does this change impact users?

We're basically reverting the CSP's enforcement of form submission behavior to what it was a couple of releases ago, before the CSP enforced it as strictly.

@lognaturel lognaturel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've reviewed the thread and agree this is a good temporary fix.

If I understand correctly, in the next release we will:

  • have frontend go back to /blank.html as soon as it's retrieved the Backend response from document.body. (#2080 (comment))
  • revert this change
  • add e2e testing about the download of encrypted submission data

@matthew-white
matthew-white merged commit 50c85fe into next Sep 4, 2026
14 checks passed
@matthew-white
matthew-white deleted the csp-form branch September 4, 2026 22:19
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.

2 participants