ModSecurity
ModSecurity copied to clipboard
Removed redundant processing for "sanitizeXXX" actions
Store "sanitizeMatched" & "sanitizeMatchedBytes" as "sanitiseMatched" & "sanitiseMatchedBytes" to avoid double processing at run-time (only 1 table scan instead of 2).
It also fixes a potential NULL pointer problem (last 3 changes):
if (rule->actionset) {
matched_bytes = apr_table_get(rule->actionset->actions, "sanitizeMatchedBytes") ? 1 : 0;
}
if(!matched_bytes)
matched_bytes = apr_table_get(rule->actionset->actions, "sanitiseMatchedBytes") ? 1 : 0;
In case rule->actionset is NULL, last line uses NULL->actions