|
|
a9ffd3 |
From jani@ulrik.uio.no Wed Oct 05 09:38:47 2011
|
|
|
a9ffd3 |
To: 644169@bugs.debian.org
|
|
|
a9ffd3 |
Subject: Re: Bug#644169: libapache2-mod-perl2: PerlOptions -Sections not
|
|
|
a9ffd3 |
permitted in server config, but should be
|
|
|
a9ffd3 |
From: Jan Ingvoldstad <jani+debian-2011+@ifi.uio.no>
|
|
|
a9ffd3 |
Date: Wed, 05 Oct 2011 11:38:37 +0200
|
|
|
a9ffd3 |
MIME-Version: 1.0
|
|
|
a9ffd3 |
Content-Transfer-Encoding: 8bit
|
|
|
a9ffd3 |
Content-Type: text/plain; charset=utf-8
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
Here is a patch that ensures that <Perl> (and Pod) sections are only
|
|
|
a9ffd3 |
allowed in the server configuration and not per directory, which
|
|
|
a9ffd3 |
incidentally matches the specification table here:
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
http://perl.apache.org/docs/2.0/user/config/config.html#mod_perl_Directives_Argument_Types_and_Allowed_Location
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
The patch has been tested on the same system where I identified the
|
|
|
a9ffd3 |
problem.
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
The patch solves the issue for me, and leaves only the following
|
|
|
a9ffd3 |
issues, as far as I can tell:
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
- Should there be fine-grained control as "PerlOptions -Sections"
|
|
|
a9ffd3 |
implies or not?
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
- The mod_perl documentation (online and in the module) probably
|
|
|
a9ffd3 |
needs to be changed to reflect that PerlOptions -Sections does not
|
|
|
a9ffd3 |
work.
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
Description: allow Perl and Pod sections only in server config
|
|
|
a9ffd3 |
Author: Jan Ingvoldstad <jani+debian-mod-perl-2011+@ifi.uio.no>
|
|
|
a9ffd3 |
Last-Update: 2011-10-05
|
|
|
a9ffd3 |
--- a/src/modules/perl/mod_perl.c 2011-02-02 21:23:45.000000000 +0100
|
|
|
a9ffd3 |
+++ b/src/modules/perl/mod_perl.c 2011-10-05 11:05:52.977576861 +0200
|
|
|
a9ffd3 |
@@ -913,18 +913,18 @@
|
|
|
a9ffd3 |
MP_CMD_DIR_ITERATE2("PerlAddVar", add_var, "PerlAddVar"),
|
|
|
a9ffd3 |
MP_CMD_DIR_TAKE2("PerlSetEnv", set_env, "PerlSetEnv"),
|
|
|
a9ffd3 |
MP_CMD_SRV_TAKE1("PerlPassEnv", pass_env, "PerlPassEnv"),
|
|
|
a9ffd3 |
- MP_CMD_DIR_RAW_ARGS_ON_READ("
|
|
|
a9ffd3 |
- MP_CMD_DIR_RAW_ARGS("Perl", perldo, "Perl Code"),
|
|
|
a9ffd3 |
+ MP_CMD_SRV_RAW_ARGS_ON_READ("
|
|
|
a9ffd3 |
+ MP_CMD_SRV_RAW_ARGS("Perl", perldo, "Perl Code"),
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
MP_CMD_DIR_TAKE1("PerlSetInputFilter", set_input_filter,
|
|
|
a9ffd3 |
"filter[;filter]"),
|
|
|
a9ffd3 |
MP_CMD_DIR_TAKE1("PerlSetOutputFilter", set_output_filter,
|
|
|
a9ffd3 |
"filter[;filter]"),
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
- MP_CMD_DIR_RAW_ARGS_ON_READ("=pod", pod, "Start of POD"),
|
|
|
a9ffd3 |
- MP_CMD_DIR_RAW_ARGS_ON_READ("=back", pod, "End of =over"),
|
|
|
a9ffd3 |
- MP_CMD_DIR_RAW_ARGS_ON_READ("=cut", pod_cut, "End of POD"),
|
|
|
a9ffd3 |
- MP_CMD_DIR_RAW_ARGS_ON_READ("__END__", END, "Stop reading config"),
|
|
|
a9ffd3 |
+ MP_CMD_SRV_RAW_ARGS_ON_READ("=pod", pod, "Start of POD"),
|
|
|
a9ffd3 |
+ MP_CMD_SRV_RAW_ARGS_ON_READ("=back", pod, "End of =over"),
|
|
|
a9ffd3 |
+ MP_CMD_SRV_RAW_ARGS_ON_READ("=cut", pod_cut, "End of POD"),
|
|
|
a9ffd3 |
+ MP_CMD_SRV_RAW_ARGS_ON_READ("__END__", END, "Stop reading config"),
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
MP_CMD_SRV_RAW_ARGS("PerlLoadModule", load_module, "A Perl module"),
|
|
|
a9ffd3 |
#ifdef MP_TRACE
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
|
|
|
a9ffd3 |
|