mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Prefer "offset" to "pos".
This commit is contained in:
parent
e7e9756966
commit
2203428507
@ -33,7 +33,7 @@ static void xml_receive_sax_error(void *data, const char *msg, ...) {
|
||||
|
||||
if (msr == NULL) return;
|
||||
|
||||
apr_snprintf(message, sizeof(message), "%s (line %d pos %d)",
|
||||
apr_snprintf(message, sizeof(message), "%s (line %d offset %d)",
|
||||
log_escape_nq(msr->mp, msr->xml->parsing_ctx->lastError.message),
|
||||
msr->xml->parsing_ctx->lastError.line,
|
||||
msr->xml->parsing_ctx->lastError.int2);
|
||||
|
@ -78,7 +78,7 @@ static int msre_op_rx_param_init(msre_rule *rule, char **error_msg) {
|
||||
/* Compile pattern */
|
||||
regex = msc_pregcomp(rule->ruleset->mp, pattern, PCRE_DOTALL | PCRE_DOLLAR_ENDONLY, &errptr, &erroffset);
|
||||
if (regex == NULL) {
|
||||
*error_msg = apr_psprintf(rule->ruleset->mp, "Error compiling pattern (pos %d): %s",
|
||||
*error_msg = apr_psprintf(rule->ruleset->mp, "Error compiling pattern (offset %d): %s",
|
||||
erroffset, errptr);
|
||||
return 0;
|
||||
}
|
||||
@ -972,7 +972,7 @@ static int msre_op_verifyCC_init(msre_rule *rule, char **error_msg) {
|
||||
/* Compile pattern */
|
||||
regex = msc_pregcomp(rule->ruleset->mp, pattern, PCRE_DOTALL | PCRE_MULTILINE, &errptr, &erroffset);
|
||||
if (regex == NULL) {
|
||||
*error_msg = apr_psprintf(rule->ruleset->mp, "Error compiling pattern (pos %d): %s",
|
||||
*error_msg = apr_psprintf(rule->ruleset->mp, "Error compiling pattern (offset %d): %s",
|
||||
erroffset, errptr);
|
||||
return 0;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ static char *var_generic_list_validate(msre_ruleset *ruleset, msre_var *var) {
|
||||
|
||||
regex = msc_pregcomp(ruleset->mp, pattern, PCRE_DOTALL | PCRE_CASELESS | PCRE_DOLLAR_ENDONLY, &errptr, &erroffset);
|
||||
if (regex == NULL) {
|
||||
return apr_psprintf(ruleset->mp, "Error compiling pattern (pos %d): %s",
|
||||
return apr_psprintf(ruleset->mp, "Error compiling pattern (offset %d): %s",
|
||||
erroffset, errptr);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user