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

Make sure function that checks content-type header value accepts nil content-type header value #3234

Merged
merged 2 commits into from
Oct 31, 2023

Conversation

GustavoCaso
Copy link
Member

@GustavoCaso GustavoCaso commented Oct 30, 2023

What does this PR do?

Fix regression introduce in b195274

Make sure that the function that checks if the content-type header
is valid for parsing the response body
and supports when there is no content-type header information.

Motivation:

Additional Notes:

How to test the change?

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@GustavoCaso GustavoCaso requested a review from a team as a code owner October 30, 2023 16:27
@github-actions github-actions bot added appsec Application Security monitoring product integrations Involves tracing integrations labels Oct 30, 2023
Copy link
Contributor

@cbeauchesne cbeauchesne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding rack/APPSEC_API_SECURITY in your CI ?

is valid for parsing the response body
and supports when there are no content-type header information.
@GustavoCaso GustavoCaso force-pushed the asm-fix-response-body-parse-logic branch from 89cc892 to 79961b8 Compare October 31, 2023 09:28
@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2023

Codecov Report

Merging #3234 (79961b8) into master (4d22403) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3234      +/-   ##
==========================================
- Coverage   98.22%   98.21%   -0.01%     
==========================================
  Files        1252     1252              
  Lines       72201    72206       +5     
  Branches     3353     3353              
==========================================
+ Hits        70917    70919       +2     
- Misses       1284     1287       +3     
Files Coverage Δ
...ib/datadog/appsec/contrib/rack/gateway/response.rb 97.56% <100.00%> (ø)
...tadog/appsec/contrib/rack/gateway/response_spec.rb 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@GustavoCaso GustavoCaso merged commit f47324f into master Oct 31, 2023
218 checks passed
@GustavoCaso GustavoCaso deleted the asm-fix-response-body-parse-logic branch October 31, 2023 14:25
@github-actions github-actions bot added this to the 1.16.0 milestone Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appsec Application Security monitoring product integrations Involves tracing integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants