Re: [BUG MP1/MP2] Apache should bail out in case of syntax errors in <Perl> section

[prev] [thread] [next] [Date index for 2005/03/09]

From: Philippe M. Chiasson
Subject: Re: [BUG MP1/MP2] Apache should bail out in case of syntax errors in <Perl> section
Date: 20:41 on 09 Mar 2005
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig04BD176F3D58D7FEA1D8D1E7
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I've identified the source of the problem I believe, so can you try this patch
and let me know if it works for you? If so, I'll be working it up a bit more and
get it in.

Index: src/modules/perl/modperl_cmd.c
===================================================================
--- src/modules/perl/modperl_cmd.c      (revision 156679)
+++ src/modules/perl/modperl_cmd.c      (working copy)
@@ -554,14 +554,17 @@
          ENTER;SAVETMPS;
          save_scalar(gv); /* local $0 */
          sv_setpv_mg(GvSV(gv), directive->filename);
-        eval_pv(arg, FALSE);
+        eval_sv(newSVpv(arg, 0), G_KEEPERR);
          modperl_env_sync_srv_env_hash2table(aTHX_ p, scfg);
          modperl_env_sync_dir_env_hash2table(aTHX_ p, dcfg);
          FREETMPS;LEAVE;
      }

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

--------------enig04BD176F3D58D7FEA1D8D1E7
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCL1+XyzKhB4jDpaURAr9eAKDEU9vZOLxQlrMCAIstCJR4JXjE/gCgkdOR
ZcebwLrviuE9IXc3zZ3aIa0=
=6KV6
-----END PGP SIGNATURE-----

--------------enig04BD176F3D58D7FEA1D8D1E7--

Re: [BUG MP1/MP2] Apache should bail out in case of syntax errors in <Perl> section
Philippe M. Chiasson 20:41 on 09 Mar 2005

Generated at 08:54 on 14 Mar 2005 by mariachi v0.52