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

Body no process #439

Closed
wants to merge 3 commits into from
Closed

Body no process #439

wants to merge 3 commits into from

Conversation

M4tteoP
Copy link
Member

@M4tteoP M4tteoP commented Sep 27, 2022

Proposes a way to fix #438.
Currently seems that the only way to evaluate the request body is by processing it via a bodyprocessor. A request with a content-type that does not lead to a specific body processing will not populate the transaction with the body that has to be evaluated.
WIP, for details please refer to #438 .

  • Custom rules inside the example will be removed when PR is ready

@codecov-commenter
Copy link

Codecov Report

Base: 73.22% // Head: 73.44% // Increases project coverage by +0.21% 🎉

Coverage data is based on head (e3864e2) compared to base (652eb0d).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           v3/dev     #439      +/-   ##
==========================================
+ Coverage   73.22%   73.44%   +0.21%     
==========================================
  Files         143      143              
  Lines        6595     6589       -6     
==========================================
+ Hits         4829     4839      +10     
+ Misses       1490     1476      -14     
+ Partials      276      274       -2     
Flag Coverage Δ
no-tinygo 73.49% <100.00%> (+0.21%) ⬆️
overall 73.44% <100.00%> (+0.21%) ⬆️
tinygo 72.32% <100.00%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/corazawaf/transaction.go 65.75% <100.00%> (+0.49%) ⬆️
http/interceptor.go 28.24% <0.00%> (+5.85%) ⬆️
bodyprocessors/bodyprocessors.go 100.00% <0.00%> (+14.28%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jcchavezs
Copy link
Member

Is this PR still valid @M4tteoP ?

@M4tteoP
Copy link
Member Author

M4tteoP commented Feb 1, 2023

Closing after #438 considerations.

@M4tteoP M4tteoP closed this Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text/plain or custom Content-Type bypasses body evaluation.
4 participants