Skip to content

nits ldap: improve some rust style#11525

Closed
catenacyber wants to merge 1 commit intoOISF:masterfrom
catenacyber:ldap-nits-1199-v1
Closed

nits ldap: improve some rust style#11525
catenacyber wants to merge 1 commit intoOISF:masterfrom
catenacyber:ldap-nits-1199-v1

Conversation

@catenacyber
Copy link
Contributor

@catenacyber catenacyber requested a review from jasonish as a code owner July 19, 2024 08:23
Self::from_intermediate_response(msg)
}
_ => ProtocolOp::Unknown,
ldap_parser::ldap::ProtocolOp::AbandonRequest(_) => ProtocolOp::Unknown,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do we not do anything with this kind of request ?

Copy link
Contributor

Choose a reason for hiding this comment

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

As I reported in a previous PR, I omitted this request because it is not handled correctly by the parser, and it gives an error when it shouldn’t, see here: rusticata/ldap-parser#6

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks and sorry for the repetition

From what I understand, the rusticate parser errors when it should not.

But when it does not error and returns some AbandonRequest, Suricata should still handle it, right ?

Copy link
Contributor

Choose a reason for hiding this comment

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

No pb!
The point is that it always returns an error, and we will never have the abandon request parsed correctly until the parser is fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you sure it always returns an error ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does not look the case to me from the error

parsing failed: Error(Ber(UnexpectedClass { expected: Some(ContextSpecific), actual: Application }))

Looks like it could return a AbandonRequest with ContextSpecific tags instead of an Application

@codecov
Copy link

codecov bot commented Jul 19, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.49%. Comparing base (6598a69) to head (c90227e).
Report is 203 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11525      +/-   ##
==========================================
- Coverage   82.54%   82.49%   -0.05%     
==========================================
  Files         923      923              
  Lines      248460   248459       -1     
==========================================
- Hits       205083   204960     -123     
- Misses      43377    43499     +122     
Flag Coverage Δ
fuzzcorpus 60.39% <0.00%> (-0.13%) ⬇️
livemode 18.64% <0.00%> (-0.01%) ⬇️
pcap 44.00% <66.66%> (+0.01%) ⬆️
suricata-verify 61.70% <66.66%> (-0.02%) ⬇️
unittests 59.11% <0.00%> (+<0.01%) ⬆️

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

@suricata-qa
Copy link

Information:

ERROR: QA failed on SURI_TLPW2_autofp_suri_time.

ERROR: QA failed on SURI_TLPR1_suri_time.

field baseline test %
SURI_TLPR1_stats_chk
.uptime 648 685 105.71%

Pipeline 21664

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 21782

@catenacyber
Copy link
Contributor Author

Good on this ?

@glongo
Copy link
Contributor

glongo commented Aug 2, 2024

Good on this ?

I would like to take another look before getting it merged.

@catenacyber
Copy link
Contributor Author

I would like to take another look before getting it merged.

friendly ping on this @glongo ?

@glongo
Copy link
Contributor

glongo commented Sep 23, 2024

I would like to take another look before getting it merged.

friendly ping on this @glongo ?

I will try to look at it this week, sorry for the delay.

@victorjulien
Copy link
Member

@glongo any further thoughts?

@glongo
Copy link
Contributor

glongo commented Oct 13, 2024

Looks good to me and I think it should be merged.

@victorjulien victorjulien added this to the 8.0 milestone Oct 13, 2024
@victorjulien
Copy link
Member

Merged in #11958, thanks!

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