Skip to content
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

Feedback broken: Content Security Policy violated #55

Open
johnjohndoe opened this issue Feb 16, 2024 · 4 comments
Open

Feedback broken: Content Security Policy violated #55

johnjohndoe opened this issue Feb 16, 2024 · 4 comments

Comments

@johnjohndoe
Copy link

johnjohndoe commented Feb 16, 2024

I tried to give feedback to https://fosdem.org/2024/schedule/event/fosdem-2024-3472-switching-the-fosdem-conference-management-system-to-pretalx/

This fails and the following error message pops up in the browser dev console:

Refused to send form data to 'https://pretalx.fosdem.org/fosdem-2024/talk/AC7NNS/feedback/' because it violates the following Content Security Policy directive: "form-action 'self'".

Brave Version 1.62.162 Chromium: 121.0.6167.164 (Official Build) (64-bit)

@johanvdw
Copy link
Member

Thanks for the report!
The good news: the feedback was reported it seems.
This must be related to my last changes (making the feedback visible to the speakers).

@johanvdw
Copy link
Member

The issue seems to stem from the redirect after the submission happened. Chrome will not do that, firefox will. In both cases data is recorded.

Can the form-action redirect to another url?

This question is currently debated, and as a result browser vendors have different implementations regarding what happens when a form is redirected to a different url.

Form data can be sent to the redirected url if the HTTP status code is 307 or 308, which makes the redirect potentially sensitive.

Currently Firefox allows the redirect, while Chrome and Safari will block them.

from https://content-security-policy.com/form-action/

so we should probably allow also https://fosdem.org in form-action

@johanvdw
Copy link
Member

This was now solved by adding to pretalx.cfg

csp_form='self',https://fosdem.org

Not yet closing the issue because I did that outside ansible

@johanvdw
Copy link
Member

johanvdw commented Mar 11, 2024

This must be related to my last changes (making the feedback visible to the speakers).

That was likely not the case, I only tested using firefox, so probably this was like that from the start.

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

No branches or pull requests

2 participants