feat: Content Type Header Validation#60
Draft
SolarFactories wants to merge 7 commits into
Draft
Conversation
Signed-off-by: SolarFactories <SolarFactories@users.noreply.github.com>
…t for XML variant. Signed-off-by: SolarFactories <SolarFactories@users.noreply.github.com>
…Removed needless Accept Header on UserService.ForceChangePassword, since it has no response on success. Signed-off-by: SolarFactories <SolarFactories@users.noreply.github.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…lices package is Go 1.21+. Signed-off-by: SolarFactories <SolarFactories@users.noreply.github.com>
…e API is marked as producing text/plain. Signed-off-by: SolarFactories <SolarFactories@users.noreply.github.com>
…on Content-Type parameters. Signed-off-by: SolarFactories <SolarFactories@users.noreply.github.com>
1c24c7d to
e0f69de
Compare
…tType, resolving lint issue on unparam. Signed-off-by: SolarFactories <SolarFactories@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AcceptHeader when exporting a BOM for a Component / Project, and requestingXMLformat.AcceptHeader onUserService.Loginfrom*/*totext/plain.Content-TypeHeader against a list of expected possible values, to avoid misleading JSON parse errors from trying to decode unexpected response formats (e.g. HTML) into JSON, e.g. when using a proxy.application/octet-stream, since that is only able to be generated ifdownload=true.application/sarif+json, since that is only able to be generated ifAcceptHeader specifies it.FindingService.GetAlldoes not override default ofapplication/json.Acceptheader being set onLoginService.ForceChangePassword, as the API does not return any content on 200 status code.