Skip to:
Steps to reproduce:
1. Navigate to Admin -> Configure Notifications -> Configure Event Notifications
2. Edit an existing rule or create a new one. Choose a UEI and click Next to get to the buildRule.jsp step.
3. In the "Current Rule" input field, enter a valid IPLIKE expression using IPv6. Example:
ipaddr IPLIKE 2001:::::::*
4. Click either "Validate rule results" or "Skip rule validation"
Expected results: Wizard moves on to next step
Actual results: Wizard redirects back to buildRule.jsp step with a message indicating the rule is invalid
Pushed fix (slightly larger than originally thought) plus unit test add to 1.12 branch.
The cause appears to be a missed update in the JdbcFilterDao, specifically the following regular expression:
private static final Pattern SQL_IPLIKE_PATTERN = Pattern.compile("(\\w+)\\s+IPLIKE\\s+([0-9.*,-]|###@d@###)", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
Updating it as follows should allow the wizard to validate IPv6 IPLIKE terms successfully:
private static final Pattern SQL_IPLIKE_PATTERN = Pattern.compile("(\\w+)\\s+IPLIKE\\s+([0-9.*,-]|[0-9a-f:*,-]|###@d+@###)", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
Steps to reproduce:
1. Navigate to Admin -> Configure Notifications -> Configure Event Notifications
2. Edit an existing rule or create a new one. Choose a UEI and click Next to get to the buildRule.jsp step.
3. In the "Current Rule" input field, enter a valid IPLIKE expression using IPv6. Example:
ipaddr IPLIKE 2001:::::::*
4. Click either "Validate rule results" or "Skip rule validation"
Expected results: Wizard moves on to next step
Actual results: Wizard redirects back to buildRule.jsp step with a message indicating the rule is invalid