[go: up one dir, main page]

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

output/http: log invalid status as a string #12128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/7311

Describe changes:

  • output/http: log invalid status as a string

Also fix integer warning on the way

SV_BRANCH=OISF/suricata-verify#2085

From #11904 in its own PR

Ticket: 7311

If response_status_number is not a valid poisitive integer,
we should not try to parse it again, and fail again,
but just log the raw string.
Copy link
codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.11%. Comparing base (5d766df) to head (391fe9f).

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #12128       +/-   ##
===========================================
+ Coverage   62.68%   83.11%   +20.43%     
===========================================
  Files         840      909       +69     
  Lines      153669   257879   +104210     
===========================================
+ Hits        96323   214343   +118020     
+ Misses      57346    43536    -13810     
Flag Coverage Δ
fuzzcorpus 60.93% <100.00%> (?)
livemode 19.43% <0.00%> (?)
pcap 44.39% <100.00%> (?)
suricata-verify 62.70% <100.00%> (+0.02%) ⬆️
unittests 59.27% <0.00%> (?)

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

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 23422

@@ -2014,6 +2014,9 @@
"status": {
"type": "integer"
},
"status_str": {
Copy link
Member

Choose a reason for hiding this comment

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

We have no occurrences of _str, but do have one as _string, so maybe we should stick with that.

Also, please add a description. I wonder if that description should also include the rule keyword for matching? Or if not applicable, even state that somehow?

Copy link
Member

Choose a reason for hiding this comment

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

guess a http.stat_code.raw? or http.stat.raw

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I will go with status_string instead of opening a new json object

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

Successfully merging this pull request may close these issues.

4 participants