From: André Malo Date: Mon, 25 Aug 2003 03:30:50 +0000 (+0000) Subject: if the tokenizer hits a string which begins with a backslash, this X-Git-Tag: pre_ajp_proxy~1218 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67083e432d66924e6a729302a25ef51c62a08b9b;p=apache if the tokenizer hits a string which begins with a backslash, this backslash will be skipped and not recognized as an escape character. That way, or the like won't work correctly. Fix it now. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101093 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 4cab633365..6edcddbec2 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) Fix mod_include's expression parser to recognize strings correctly + even if they start with an escaped token. [André Malo] + *) Major overhaul of mod_include's filter parser. The new parser code is expected to be more robust and should catch all of the edge cases that were not handled by the previous one. This includes a binary diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 034e2165be..fae20bbc7b 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -1056,14 +1056,12 @@ static int get_ptoken(apr_pool_t *pool, const char **parse, token_t *token) return 0; } - /* - * It's a string or regex token + /* It's a string or regex token + * Now search for the next token, which finishes this string */ - token->value = unmatched ? *parse : p; - - /* Now search for the next token, which finishes this string */ shift = 0; - p = *parse; + p = *parse = token->value = unmatched ? *parse : p; + for (; **parse; p = ++*parse) { if (**parse == '\\') { if (!*(++*parse)) {