Stas Bekman <[EMAIL PROTECTED]> writes:
The error comes from return $filter->next->pass_brigade($bb2);
in sub handler in TestFilter::out_bbs_filebucket;
So it's some Apache filter that throws an error,
It's wierder than that- the return value is tainted somehow:
my $status = $filter->next->pass_brigade($bb); Dump $status; return 0; # OK, but fails when you try using $status here
~>
SV = PVMG(0x354cff0) at 0x2cd76d0 REFCNT = 1 FLAGS = (PADBUSY,PADMY,GMG,SMG,pIOK,pPOK) IV = 0 NV = 0 PV = 0x2eaa3a0 "0"\0 CUR = 1 LEN = 2 MAGIC = 0x2ed68f0 MG_VIRTUAL = &PL_vtbl_taint MG_TYPE = PERL_MAGIC_taint(t) MG_LEN = 1
A really bad workaround is this patch:
Index: src/modules/perl/modperl_callback.c
===================================================================
RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/modperl_callback.c,v
retrieving revision 1.75
diff -u -r1.75 modperl_callback.c
--- src/modules/perl/modperl_callback.c 9 Jul 2004 08:01:20 -0000 1.75
+++ src/modules/perl/modperl_callback.c 23 Sep 2004 03:27:14 -0000
@@ -107,7 +107,7 @@
else {
SV *status_sv = POPs;
- if (SvIOK(status_sv)) {
+ if (SvIOKp(status_sv)) {
/* normal IV return (e.g., Apache::OK) */
status = SvIVX(status_sv);
}
However I think the return value should never be marked as tainted in the first place, so something else bad is happening (not sure what though).
For now I've just changed it to coercing into IV. May be someone will find some better solution.
The tainted return value will happen every time something will turn the interpreter state to the tainted mode (PL_tainted). When PL_tainted is on, most (any?) created in C/XS perl variable will be automatically tainted. This is not under our control. In particular, the bug is triggered by t/filter/in_error.t, which calls modperl_croak in the nested eval_sv (since there is a response handler calling a filter handler), and Perl has a bug in this case, as it sets PL_tainted on and has some other problems. Dave Mitchell has solved it in 5.8.6-tobe I think. I should verify that.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]