You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@hyperreal.org on 1998/12/22 17:01:44 UTC
cvs commit: modperl/t/net/perl test
dougm 98/12/22 08:01:44
Modified: . Changes ToDo
src/modules/perl mod_perl.c mod_perl.h perl_config.c
t/net/perl test
Log:
internal $Apache::__T variable now properly set again
Revision Changes Path
1.229 +3 -0 modperl/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl/Changes,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -r1.228 -r1.229
--- Changes 1998/12/16 00:37:56 1.228
+++ Changes 1998/12/22 16:01:40 1.229
@@ -8,6 +8,9 @@
=item 1.16_03-dev
+internal $Apache::__T variable now properly set again, thanks to Stas
+Bekman for the spot
+
fix so "top-level" Perl{Set,Pass}Env works if Perl is started early
new $r->pnotes method
1.133 +0 -2 modperl/ToDo
Index: ToDo
===================================================================
RCS file: /home/cvs/modperl/ToDo,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- ToDo 1998/12/16 00:37:57 1.132
+++ ToDo 1998/12/22 16:01:41 1.133
@@ -5,8 +5,6 @@
- turn of strip of httpd in Apache's install.sh
-- method handler called when it shouldn't be? (Ken)
-
- <perl> sections and DirectoryIndex (Eric Cholet)
- Perl{Set,Pass}Env tainted, should they not be? (Vivek)
1.65 +1 -5 modperl/src/modules/perl/mod_perl.c
Index: mod_perl.c
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- mod_perl.c 1998/12/16 00:45:18 1.64
+++ mod_perl.c 1998/12/22 16:01:42 1.65
@@ -619,11 +619,7 @@
GvSV_setiv(gv, TRUE);
#endif
- gv = GvSV_init("Apache::__T");
- if(cls->PerlTaintCheck)
- GvSV_setiv(gv, TRUE);
- SvREADONLY_on(GvSV(gv));
-
+ perl_tainting_set(s, cls->PerlTaintCheck);
(void)GvSV_init("Apache::__SendHeader");
(void)GvSV_init("Apache::__CurrentCallback");
(void)GvHV_init("mod_perl::UNIMPORT");
1.68 +1 -0 modperl/src/modules/perl/mod_perl.h
Index: mod_perl.h
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- mod_perl.h 1998/12/16 00:37:58 1.67
+++ mod_perl.h 1998/12/22 16:01:42 1.68
@@ -1132,6 +1132,7 @@
void perl_handle_command_hv(HV *hv, char *key, cmd_parms *cmd, void *dummy);
void perl_handle_command_av(AV *av, I32 n, char *key, cmd_parms *cmd, void *dummy);
+void perl_tainting_set(server_rec *s, int arg);
CHAR_P perl_cmd_require (cmd_parms *parms, void *dummy, char *arg);
CHAR_P perl_cmd_module (cmd_parms *parms, void *dummy, char *arg);
CHAR_P perl_cmd_var(cmd_parms *cmd, perl_dir_config *rec, char *key, char *val);
1.59 +18 -5 modperl/src/modules/perl/perl_config.c
Index: perl_config.c
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- perl_config.c 1998/12/16 00:37:58 1.58
+++ perl_config.c 1998/12/22 16:01:42 1.59
@@ -557,14 +557,27 @@
}
#endif
+void perl_tainting_set(server_rec *s, int arg)
+{
+ dPSRV(s);
+ GV *gv;
+
+ cls->PerlTaintCheck = arg;
+ if(PERL_RUNNING()) {
+ gv = GvSV_init("Apache::__T");
+ if(arg) {
+ SvREADONLY_off(GvSV(gv));
+ GvSV_setiv(gv, TRUE);
+ SvREADONLY_on(GvSV(gv));
+ tainting = TRUE;
+ }
+ }
+}
+
CHAR_P perl_cmd_tainting (cmd_parms *parms, void *dummy, int arg)
{
- dPSRV(parms->server);
MP_TRACE_d(fprintf(stderr, "perl_cmd_tainting: %d\n", arg));
- cls->PerlTaintCheck = arg;
-#ifdef PERL_SECTIONS
- if(arg && PERL_RUNNING()) tainting = TRUE;
-#endif
+ perl_tainting_set(parms->server, arg);
return NULL;
}
1.14 +3 -1 modperl/t/net/perl/test
Index: test
===================================================================
RCS file: /home/cvs/modperl/t/net/perl/test,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- test 1998/11/20 04:16:13 1.13
+++ test 1998/12/22 16:01:43 1.14
@@ -93,7 +93,9 @@
}
$r->print("TOTAL: ", scalar keys %ENV);
-
+unless ($Apache::__T) {
+ die "\$Apache::__T not set!";
+}
if ($ENV{CONTENT_LENGTH}) {
#$len = $ENV{CONTENT_LENGTH};
my $content = $r->content;