diff --git a/apache2/apache2_config.c b/apache2/apache2_config.c index 188af59c..b7ae56c0 100644 --- a/apache2/apache2_config.c +++ b/apache2/apache2_config.c @@ -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 */ 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); } diff --git a/apache2/re.c b/apache2/re.c index efd90c6c..70956dbb 100644 --- a/apache2/re.c +++ b/apache2/re.c @@ -353,7 +353,7 @@ char *update_rule_target_ex(modsec_rec *msr, msre_ruleset *ruleset, msre_rule *r } #if !defined(MSC_TEST) 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 goto end;