Skip to content

Add charset to Content-Type header #1948

Description

@wesleybl

Is your feature request related to a problem? Please describe.

A security scanner reported the vulnerability Web Server Misconfiguration: Insecure Content-Type Setting because plone.restapi responses do not include the charset specification in the Content-Type header. Currently, responses return content-type:application/json without charset, which can lead to potential Cross-Site Scripting vulnerabilities due to incorrect interpretation of the character encoding.

Describe the solution you'd like

I would like plone.restapi to automatically include the charset specification in all JSON responses. The Content-Type header should be:

content-type: application/json; charset=utf-8

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions