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

[Security] Fix XSS Vulnerability where content-type header wasn't explicitly set in API requests #21930

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

NiniOak
Copy link
Contributor

@NiniOak NiniOak commented Nov 6, 2024

Description

  • Modified existing ensureContentTypeHeader middleware to set the response Content-Type to match the type of content that the server will process.

Testing & Reproduction steps

Updated unit tests to add additional checks for content-type header
Vercel should deploy UI with no errors

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

@github-actions github-actions bot added the theme/api Relating to the HTTP API interface label Nov 6, 2024
@NiniOak NiniOak marked this pull request as draft November 7, 2024 01:14
@NiniOak NiniOak force-pushed the SECVULN-8621_consul_api_validate_request_content_type branch from b16d7ef to 1144eec Compare November 7, 2024 22:55
@NiniOak NiniOak marked this pull request as ready for review November 7, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/api Relating to the HTTP API interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant