Whitelists settings - pages, parameters, and users that by-pass the Firewall
It’s possible to specify certain factors that completely by-pass all Firewall checking. In principle, you should not need to whitelist anything or anyone unless you have discovered a collision with another plugin.
Whitelist Parameter option explanations
The following option should be used sparingly and with caution since you never want to whitelist anyone, even yourself unless you really must.
Option: Whitelist Parameters
How does the pages/parameters whitelist work?
It is a comma-separated list of pages and parameters. A NEW LINE should be taken for each new page name and its associated parameters.
The first entry on each line (before the first comma) is the page name. The rest of the items on the line are the parameters.
The following are some simple examples to illustrate:
edit.php, featured
On the edit.php page, the parameter with the name ‘featured’ will be ignored.
admin.php, url, param01, password
Any parameters that are passed to the page ending in ‘admin.php’ with the names ‘url’, ‘param01’ and ‘password’ will be excluded from the firewall processing.
*, url, param, password
Putting a star first means that these exclusions apply to all pages. So for every page that is accessed, all the parameters that are url, param and password will be ignored by the firewall.
Here're a few examples of the Firewall entries and what should be whitelisted (please also see the screenshot at the end of the page):
Example #1
Request blocked by firewall rule: Aggressive Scan. Rule pattern detected: "#(`|<|>|[|]|{|}|?)#". The offending request parameter was "<?xml_version" with a value of "abcdxxxxxxxxxxx".
The parameter to whitelist is "<?xml_version". So the rule would be:
*, <?xml_version
Alternatively, you can turn off the "Aggressive Scan" option as that's the firewall rule being triggered.
Example #2
Request blocked by firewall rule: Aggressive Scan. Rule pattern detected: "https://testsite.com/". The offending request parameter was "redirect" with a value of "abcdxxxxxxxx".
The parameter to whitelist is "redirect". So the rule would be:
*, redirect
Alternatively, you can turn off the "Aggressive Scan" option as that's the firewall rule being triggered.
How to use * (asterisks)
* (asterisks) refers to all pages and for example, you want to whitelist the parameters for all pages:
- s
- post_type
- shop_view
- add_to_wishlist
To achieve this, you use the following rule as each page (or asterisk) can only appear once:
*, s, post_type, shop_view, add_to_wishlist
This will whitelist those 4 parameters for all pages.
Another example is if you want to do this for 1 particular page, e.g.:
posts.php, s, post_type, shop_view, add_to_wishlist
Important: This is an advanced setting where you can by-pass the firewall for a given page such as ‘hello.php’, or by-pass the firewall for a given parameter sent to that page. This is useful where certain pages/plugins submit data that you always want to leave untouched by the firewall.
Please note that this is a place for whitelisting page request parameters only, and can't be used for whitelisting IP addresses. If you'd like to whitelist IPs, you can use IP Management and Analysis tool here.
For more information on how the Shield's Firewall works, read the blog article here.
For examples of the Firewall entries in the WP Activity Log, how to interpret them and whitelist parameters, read the article here.