httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_include.c
Date Mon, 25 Aug 2003 03:30:50 GMT
nd          2003/08/24 20:30:50

  Modified:    .        CHANGES
               modules/filters mod_include.c
  Log:
  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, <!--#if expr="\)"--> or the like won't work correctly.
  Fix it now.
  
  Revision  Changes    Path
  1.1263    +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1262
  retrieving revision 1.1263
  diff -u -r1.1262 -r1.1263
  --- CHANGES	25 Aug 2003 00:13:19 -0000	1.1262
  +++ CHANGES	25 Aug 2003 03:30:50 -0000	1.1263
  @@ -2,6 +2,9 @@
   
     [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
  
  
  
  1.264     +4 -6      httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.263
  retrieving revision 1.264
  diff -u -r1.263 -r1.264
  --- mod_include.c	25 Aug 2003 02:49:19 -0000	1.263
  +++ mod_include.c	25 Aug 2003 03:30:50 -0000	1.264
  @@ -1056,14 +1056,12 @@
           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)) {
  
  
  

Mime
View raw message