mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Prefer "offset" to "pos".
This commit is contained in:
@@ -33,7 +33,7 @@ static void xml_receive_sax_error(void *data, const char *msg, ...) {
|
|||||||
|
|
||||||
if (msr == NULL) return;
|
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),
|
log_escape_nq(msr->mp, msr->xml->parsing_ctx->lastError.message),
|
||||||
msr->xml->parsing_ctx->lastError.line,
|
msr->xml->parsing_ctx->lastError.line,
|
||||||
msr->xml->parsing_ctx->lastError.int2);
|
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 */
|
/* Compile pattern */
|
||||||
regex = msc_pregcomp(rule->ruleset->mp, pattern, PCRE_DOTALL | PCRE_DOLLAR_ENDONLY, &errptr, &erroffset);
|
regex = msc_pregcomp(rule->ruleset->mp, pattern, PCRE_DOTALL | PCRE_DOLLAR_ENDONLY, &errptr, &erroffset);
|
||||||
if (regex == NULL) {
|
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);
|
erroffset, errptr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -972,7 +972,7 @@ static int msre_op_verifyCC_init(msre_rule *rule, char **error_msg) {
|
|||||||
/* Compile pattern */
|
/* Compile pattern */
|
||||||
regex = msc_pregcomp(rule->ruleset->mp, pattern, PCRE_DOTALL | PCRE_MULTILINE, &errptr, &erroffset);
|
regex = msc_pregcomp(rule->ruleset->mp, pattern, PCRE_DOTALL | PCRE_MULTILINE, &errptr, &erroffset);
|
||||||
if (regex == NULL) {
|
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);
|
erroffset, errptr);
|
||||||
return 0;
|
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);
|
regex = msc_pregcomp(ruleset->mp, pattern, PCRE_DOTALL | PCRE_CASELESS | PCRE_DOLLAR_ENDONLY, &errptr, &erroffset);
|
||||||
if (regex == NULL) {
|
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);
|
erroffset, errptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user