Poor experience using custom expressions in WAF rules

What is the name of the domain?

dash.cloudflare.com

What is the issue you’re encountering

When attempting to create a WAF rule with a custom expression it is very easy to accidentally have syntax errors. This makes sense as it is freeform text input and that is my fault. The problem is that the error for any syntax errors shows up after a page redirect which wipes out all text that was in the custom expression, so unless you copy the expression before attempting to submit then you lose all edits or perhaps the entire expression if it was a new submission. This is a bit silly, it seems like it would be simple enough to wait for the server response and show the error message without wiping out the input fields so that I can find and fix my syntax error without having to rewrite it from scratch

What are the steps to reproduce the issue?

Create a WAF custom rule, add a title, click ‘edit expression’ to get a free-form expression box. Then enter an expression with an invalid syntax. Set the action type to anything. Attempt to submit the rule, the page will be redirected to a blank rule entry form and then an error will appear for a few seconds at the bottom of the page.

Screenshot of the error

Might be the uppersand, quotes usage while copy-pasting.
Try with replacing and using this one here '.
Nevertheless, looks like you’re missing some part or closed/open bracket ( in combination with an operator OR or AND.

Please share your expression here so we could reply back with corrected one which you can copy-paste.

I already know what the error is, the issue is not that the expression is wrong, the issue is that the user interface wipes out your entire expression any time you have even one syntax error instead of staying on the screen and letting you edit it.

This topic was automatically closed after 15 days. New replies are no longer allowed.