Skip to content

fix using relevant statuses + noauditlog #2643

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

Closed

Conversation

AirisX
Copy link

@AirisX AirisX commented Nov 16, 2021

No description provided.

@martinhsv
Copy link
Contributor

Closing for the reasons in the related issue (incuding that this pull request would break DetectionOnly functionality).

@martinhsv martinhsv closed this Dec 20, 2021
@AirisX
Copy link
Author

AirisX commented Dec 20, 2021

Hi @martinhsv ,
Why are you sure this PR would break DetectionOnly functionality? In my recent posts here #2637 I have provided example code that preserves this functionality:

if ((m_status == RelevantOnlyAuditLogStatus
        && this->isRelevant(transaction->m_httpCodeReturned) == false
        && transaction->getRuleEngineState() != static_cast<int>(RulesSetProperties::DetectionOnlyRuleEngine)) 
        || saveAnyway == false ) {

@martinhsv
Copy link
Contributor

But that sample code is not part of this PR. This PR, as it stands, cannot be merged because it would break functionality.

You are welcome to submit a fresh pull request for consideration along the lines of what I described in #2637.

@AirisX
Copy link
Author

AirisX commented Dec 20, 2021

I planned to include these lines after the discussion in # 2637. Ok, I'll open the new PR to include lines above

@877509395
Copy link

877509395 commented Dec 21, 2021 via email

@martinhsv
Copy link
Contributor

Hello @877509395 ,

I would encourage you to not post unrelated content into PRs or issues. Since such issues and PRs persist, it's helpful if each PR or issue only contains postings relevant to it.

Regarding your assertion, if you think you have identified some anomaly certainly feel free to open an issue for it. In this case, however, I would suggest more investigation on your part would be in order. You state that 'modsecurity create two transactions for this request'. That is unlikely. If a second transaction is being processed, it is much more likely that it is being created some other way such as through nginx configuration that includes error redirects. See for example owasp-modsecurity/ModSecurity-nginx#152 (comment)

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.

3 participants