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

Add application/x-x509-ca-cert to avoid Unexpected Content-Type being returned #8231

Open
ssthom opened this issue Dec 8, 2023 · 0 comments · May be fixed by #8232
Open

Add application/x-x509-ca-cert to avoid Unexpected Content-Type being returned #8231

ssthom opened this issue Dec 8, 2023 · 0 comments · May be fixed by #8232
Labels

Comments

@ssthom
Copy link
Contributor

ssthom commented Dec 8, 2023

Similar to #8226

application/x-x509-ca-cert is the default response from our Spring-Boot application when there is an error like 404 and it was trying to get a cert file that doesn't exist: https://example.com/key.pem

But it is a valid response type when looking at https://www.iana.org/assignments/media-types/application/x-x509-ca-cert and https://datatracker.ietf.org/doc/html/rfc5280

4.2.1.1. CA Certificate Response Message Format
If the CA does not have any intermediate CA certificates, the response consists of a single X.509 CA certificate. The response will have a Content-Type of "application/x-x509-ca-cert".
"Content-Type: application/x-x509-ca-cert"

Steps to reproduce the behavior

  1. Create spring-boot application
  2. Scan a GET endpoint with ZAP, which will try with /key.pem
  3. The report will have the "Unexpected Content-Type was returned" finding with application/x-x509-ca-cert

Screenshots

image

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

Successfully merging a pull request may close this issue.

2 participants