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

Dynamic Rule Messages not being recorded correctly #56

Open
P-a-d-r-a-i-g opened this issue Aug 8, 2016 · 0 comments
Open

Dynamic Rule Messages not being recorded correctly #56

P-a-d-r-a-i-g opened this issue Aug 8, 2016 · 0 comments

Comments

@P-a-d-r-a-i-g
Copy link

When a rule_message is logged it uses the following SQL:

$sql_ruleMessage = 'INSERT IGNORE INTOrule_message(message_ruleId,message_ruleMsg) VALUES (:MessageRuleId2, :MessageMsg)';

So, the next time the same ruleId is used, it doesn't do anything but links to the existing rule and message. So, the 1st ruleMsg logged is the one that applies to that rule forever.

The problem with this is that some ruleMsg text changes per call, such as the inclusion of the source IP address e.g. Denial of Service (DoS) Attack Identified from x.x.x.x (y hits since last alert).

We can't do INSERT ... ON DUPLICATE KEY UPDATE because then the latest message will always be the one shown then.

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

No branches or pull requests

1 participant