Skip to content

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

Merged
GustavoCaso merged 2 commits into
masterfrom
asm-fix-response-body-parse-logic
Oct 31, 2023
Merged

Make sure function that checks content-type header value accepts nil content-type header value#3234
GustavoCaso merged 2 commits into
masterfrom
asm-fix-response-body-parse-logic

Conversation

@GustavoCaso

@GustavoCaso GustavoCaso commented Oct 30, 2023

Copy link
Copy Markdown
Contributor

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

@cbeauchesne cbeauchesne left a comment

Copy link
Copy Markdown
Contributor

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 ?

Gustavo Caso added 2 commits October 31, 2023 10:27
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

codecov-commenter commented Oct 31, 2023

Copy link
Copy Markdown

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
@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