httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: [BUG]: "mod-rewrite broke from 1.2b4 to 1.2b6" on Solaris 2.x (fwd)
Date Tue, 28 Jan 1997 16:23:29 GMT
------- Blind-Carbon-Copy

To: stange@bnl.gov
Subject: Re: [BUG]: "mod-rewrite broke from 1.2b4 to 1.2b6" on Solaris 2.x (fwd) 
In-reply-to: robh's message of Tue, 28 Jan 1997 11:26:06 +0000.
         <Pine.BSF.3.91.970128112550.1606I-100000@localhost.imdb.com> 
X-uri: http://www.zyzzyva.com/
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Tue, 28 Jan 1997 10:23:29 -0600
From: Randy Terbush <randy@sierra>

The following patch should fix the bug which was introduced in
the overflow changes applied to 1.2b6.

Index: mod_rewrite.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_rewrite.c,v
retrieving revision 1.15
diff -c -r1.15 mod_rewrite.c
*** mod_rewrite.c	1997/01/20 04:28:15	1.15
- --- mod_rewrite.c	1997/01/28 05:33:58
***************
*** 1544,1550 ****
              /* substitute in output */
  #ifdef HAS_APACHE_REGEX_LIB
              strncpy(newuri, pregsub(r->pool, output, uri, regexp->re_nsub+1, regmatch),
sizeof(newuri)-1);    /* substitute in output */
! 	    newuri[sizeof(newuri-1)] = '\0'; 
  #else
              regsub(regexp, output, newuri);                      /* substitute in output
*/
  #endif
- --- 1544,1550 ----
              /* substitute in output */
  #ifdef HAS_APACHE_REGEX_LIB
              strncpy(newuri, pregsub(r->pool, output, uri, regexp->re_nsub+1, regmatch),
sizeof(newuri)-1);    /* substitute in output */
! 	    newuri[sizeof(newuri)-1] = '\0'; 
  #else
              regsub(regexp, output, newuri);                      /* substitute in output
*/
  #endif



> 
> One for Ralf..
> 
> ---------- Forwarded message ----------
> Date: Mon Jan 27 11:22:38 1997
> From: stange@bnl.gov
> To: apache-bugs%apache.org@organic.com
> Subject: [BUG]: "mod-rewrite broke from 1.2b4 to 1.2b6" on Solaris 2.x
> 
> Submitter: stange@bnl.gov
> Operating system: Solaris 2.x, version: 2.5.1
> Version of Apache Used: 1.2b6
> Extra Modules used: rewrite, proxy, agent_log, refererlog
> URL exhibiting problem: 
> 
> Symptoms:
> --
> we rewrite some URL's from
> 
> http://.../people/username to the relevant home directories.
> This is done so that the people don't actually need
> accounts on the server.  The automounter takes care
> of some of the work.
> 
> Here are the rewrite rules:
> 
> RewriteEngine on
> RewriteRule /people/([a-z0-9A-Z]+)$ /people/$1/ [L,R]
> RewriteRule /people/([a-z0-9A-Z]+)/$ /users/$1/www/ [L]
> RewriteRule /people/([a-z0-9A-Z]+)/(.*) /users/$1/www/$2
> 
> Somehow, it's mapping /people/stange/index.html
> into /use
> 
> This works correctly in 1.2b4.
> 
> --
> 
> Backtrace:
> --
> 
> --
> 




------- End of Blind-Carbon-Copy

Mime
View raw message