perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@hyperreal.org
Subject cvs commit: modperl/src/modules/perl mod_perl.c
Date Mon, 13 Jul 1998 21:34:10 GMT
dougm       98/07/13 14:34:10

  Modified:    src/modules/perl mod_perl.c
  Log:
  mod_perl_set_cwd() will try to getenv("PWD") before trying Cwd::fastcwd()
  which does not untaint in 5.004
  
  Revision  Changes    Path
  1.30      +8 -2      modperl/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/mod_perl.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- mod_perl.c	1998/07/12 19:54:16	1.29
  +++ mod_perl.c	1998/07/13 21:34:09	1.30
  @@ -352,8 +352,14 @@
   {
       char *name = "Apache::Server::CWD";
       GV *gv = gv_fetchpv(name, GV_ADDMULTI, SVt_PV);
  -    SV *cwd = perl_eval_pv("require Cwd; Cwd::fastcwd()", TRUE);
  -    sv_setsv(GvSV(gv), cwd);
  +    char *pwd = getenv("PWD");
  +
  +    if(pwd) 
  +	sv_setpv(GvSV(gv), pwd);
  +    else
  +	sv_setsv(GvSV(gv), 
  +		 perl_eval_pv("require Cwd; Cwd::fastcwd()", TRUE));
  +
       mod_perl_untaint(GvSV(gv));
   }
   
  
  
  

Mime
View raw message