[MODSEC-386] Added error msg for update target by id function

This commit is contained in:
Breno Silva 2013-03-19 06:19:01 -04:00
parent 43162f52cf
commit a5c1492049
2 changed files with 5 additions and 1 deletions

View File

@ -1958,6 +1958,10 @@ static const char *cmd_rule_update_target_by_id(cmd_parms *cmd, void *_dcfg,
/* TODO: Validate the range here, while we can still tell the user if it's invalid */ /* TODO: Validate the range here, while we can still tell the user if it's invalid */
re->param = p1; re->param = p1;
if(dcfg->ruleset == NULL) {
return apr_psprintf(cmd->pool, "Updating target by ID with no ruleset in this context");
}
return msre_ruleset_rule_update_target_matching_exception(NULL, dcfg->ruleset, re, p2, p3); return msre_ruleset_rule_update_target_matching_exception(NULL, dcfg->ruleset, re, p2, p3);
} }

View File

@ -353,7 +353,7 @@ char *update_rule_target_ex(modsec_rec *msr, msre_ruleset *ruleset, msre_rule *r
} }
#if !defined(MSC_TEST) #if !defined(MSC_TEST)
else { else {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, " ModSecurity: Error parseing rule targets to replace variable"); ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, " ModSecurity: Error parsing rule targets to replace variable");
} }
#endif #endif
goto end; goto end;