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

detect/integers: add support for negated strings when enum is used - v1 #12444

Closed

Conversation

AkakiAlice
Copy link
Contributor

@AkakiAlice AkakiAlice commented Jan 21, 2025

Ticket: #7513

Contribution style:

Our Contribution agreements:

Changes (if applicable):

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

Describe changes:

function detect_parse_uint_enum can parse strings like !bind_request

Ticket: OISF#7513
@AkakiAlice AkakiAlice requested a review from jasonish as a code owner January 21, 2025 17:49
pub fn detect_parse_uint_enum<T1: DetectIntType, T2: EnumString<T1>>(
s: &str,
) -> Option<DetectUintData<T1>> {
let (s, neg) = opt::<&str, _, Error<_>, _>(char('!'))(s).ok()?;
Copy link
Contributor

Choose a reason for hiding this comment

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

@jasonish do you know simpler rust ?

Copy link
Contributor

@catenacyber catenacyber left a comment

Choose a reason for hiding this comment

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

Needs a SV test

@catenacyber
Copy link
Contributor

And needs green CI for rfb-rules-8

@AkakiAlice
Copy link
Contributor Author

Replaced by: #12453

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.

2 participants