Skip to content

Update the CSP header for copi.owasp.org to include form-action 'self'. #2763

@sydseter

Description

@sydseter

Update the CSP header for copi.owasp.org to include form-action 'self'.
This restricts form submissions to only be sent back to its own origin.

Updated Header Example:

Content-Security-Policy: default-src 'self'; base-uri 'self'; frame-ancestors 'self'; form-action 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self';

To fix this, you might have to create a new plug (NB: incomplete example):

pipeline :browser do

  # imports ...
  # header
  plug :put_secure_browser_headers, %{
    "content-security-policy" => "default-src 'self'; base-uri 'self'; frame-ancestors 'self'; form-action 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self';"
  }
end

Metadata

Metadata

Labels

bugSomething isn't workingcopi.owasp.orgelixirPull requests that update elixir code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions