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/mappers mod_rewrite.c
Date Tue, 29 Jul 2003 01:14:19 GMT
nd          2003/07/28 18:14:18

  Modified:    .        CHANGES
               modules/mappers mod_rewrite.c
  Log:
  cause a lookup failure in external rewrite maps if
  the key contains a newline.
  
  PR: 14453
  Submitted originally by: Cedric Gavage <cedric.gavage@unixtech.be>
  
  Revision  Changes    Path
  1.1242    +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1241
  retrieving revision 1.1242
  diff -u -r1.1241 -r1.1242
  --- CHANGES	28 Jul 2003 15:35:15 -0000	1.1241
  +++ CHANGES	29 Jul 2003 01:14:15 -0000	1.1242
  @@ -2,6 +2,10 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_rewrite: In external rewrite maps lookup keys containing
  +     a newline now cause a lookup failure. PR 14453.
  +     [Cedric Gavage <cedric.gavage@unixtech.be>, André Malo]
  +
     *) Install config.nice into the build/ directory to make
        minor version upgrades easier. [Joshua Slive]
   
  
  
  
  1.199     +6 -1      httpd-2.0/modules/mappers/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
  retrieving revision 1.198
  retrieving revision 1.199
  diff -u -r1.198 -r1.199
  --- mod_rewrite.c	29 Jul 2003 00:33:13 -0000	1.198
  +++ mod_rewrite.c	29 Jul 2003 01:14:17 -0000	1.199
  @@ -1290,8 +1290,13 @@
        * context then the rewritemap-programs were not spawned.
        * In this case using such a map (usually in per-dir context)
        * is useless because it is not available.
  +     *
  +     * newlines in the key leave bytes in the pipe and cause
  +     * bad things to happen (next map lookup will use the chars
  +     * after the \n instead of the new key etc etc - in other words,
  +     * the Rewritemap falls out of sync with the requests).
        */
  -    if (fpin == NULL || fpout == NULL) {
  +    if (fpin == NULL || fpout == NULL || ap_strchr(key, '\n')) {
           return NULL;
       }
   
  
  
  

Mime
View raw message