httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: apache-1.3/src/modules/standard mod_rewrite.c
Date Mon, 12 Jan 2004 02:05:19 GMT
nd          2004/01/11 18:05:19

  Modified:    src      CHANGES
               src/modules/standard mod_rewrite.c
  Log:
  cause a lookup failure if the map key contains a newline
  
  PR: 14453
  Reviewed by: Jeff Trawick, Justin Erenkrantz
  
  Revision  Changes    Path
  1.1916    +4 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1915
  retrieving revision 1.1916
  diff -u -u -r1.1915 -r1.1916
  --- CHANGES	31 Dec 2003 11:58:21 -0000	1.1915
  +++ CHANGES	12 Jan 2004 02:05:18 -0000	1.1916
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3.30
   
  +  *) 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]
  +
     *) Forensic logging module added (mod_log_forensic).
        [Ben Laurie]
   
  
  
  
  1.190     +7 -2      apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.189
  retrieving revision 1.190
  diff -u -u -r1.189 -r1.190
  --- mod_rewrite.c	1 Jan 2004 13:32:56 -0000	1.189
  +++ mod_rewrite.c	12 Jan 2004 02:05:19 -0000	1.190
  @@ -3100,11 +3100,16 @@
        * 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 == -1 || fpout == -1) {
  +    if (fpin == -1 || fpout == -1 || strchr(key, '\n')) {
           return NULL;
       }
  -
  + 
       /* take the lock */
       rewritelock_alloc(r);
   
  
  
  

Mime
View raw message