1 |
From jani@ulrik.uio.no Wed Oct 05 09:38:47 2011 |
2 |
To: 644169@bugs.debian.org |
3 |
Subject: Re: Bug#644169: libapache2-mod-perl2: PerlOptions -Sections not |
4 |
permitted in server config, but should be |
5 |
From: Jan Ingvoldstad <jani+debian-2011+@ifi.uio.no> |
6 |
Date: Wed, 05 Oct 2011 11:38:37 +0200 |
7 |
MIME-Version: 1.0 |
8 |
Content-Transfer-Encoding: 8bit |
9 |
Content-Type: text/plain; charset=utf-8 |
10 |
|
11 |
Here is a patch that ensures that <Perl> (and Pod) sections are only |
12 |
allowed in the server configuration and not per directory, which |
13 |
incidentally matches the specification table here: |
14 |
|
15 |
http://perl.apache.org/docs/2.0/user/config/config.html#mod_perl_Directives_Argument_Types_and_Allowed_Location |
16 |
|
17 |
The patch has been tested on the same system where I identified the |
18 |
problem. |
19 |
|
20 |
The patch solves the issue for me, and leaves only the following |
21 |
issues, as far as I can tell: |
22 |
|
23 |
- Should there be fine-grained control as "PerlOptions -Sections" |
24 |
implies or not? |
25 |
|
26 |
- The mod_perl documentation (online and in the module) probably |
27 |
needs to be changed to reflect that PerlOptions -Sections does not |
28 |
work. |
29 |
|
30 |
Description: allow Perl and Pod sections only in server config |
31 |
Author: Jan Ingvoldstad <jani+debian-mod-perl-2011+@ifi.uio.no> |
32 |
Last-Update: 2011-10-05 |
33 |
--- a/src/modules/perl/mod_perl.c 2011-02-02 21:23:45.000000000 +0100 |
34 |
+++ b/src/modules/perl/mod_perl.c 2011-10-05 11:05:52.977576861 +0200 |
35 |
@@ -913,18 +913,18 @@ |
36 |
MP_CMD_DIR_ITERATE2("PerlAddVar", add_var, "PerlAddVar"), |
37 |
MP_CMD_DIR_TAKE2("PerlSetEnv", set_env, "PerlSetEnv"), |
38 |
MP_CMD_SRV_TAKE1("PerlPassEnv", pass_env, "PerlPassEnv"), |
39 |
- MP_CMD_DIR_RAW_ARGS_ON_READ("<Perl", perl, "Perl Code"), |
40 |
- MP_CMD_DIR_RAW_ARGS("Perl", perldo, "Perl Code"), |
41 |
+ MP_CMD_SRV_RAW_ARGS_ON_READ("<Perl", perl, "Perl Code"), |
42 |
+ MP_CMD_SRV_RAW_ARGS("Perl", perldo, "Perl Code"), |
43 |
|
44 |
MP_CMD_DIR_TAKE1("PerlSetInputFilter", set_input_filter, |
45 |
"filter[;filter]"), |
46 |
MP_CMD_DIR_TAKE1("PerlSetOutputFilter", set_output_filter, |
47 |
"filter[;filter]"), |
48 |
|
49 |
- MP_CMD_DIR_RAW_ARGS_ON_READ("=pod", pod, "Start of POD"), |
50 |
- MP_CMD_DIR_RAW_ARGS_ON_READ("=back", pod, "End of =over"), |
51 |
- MP_CMD_DIR_RAW_ARGS_ON_READ("=cut", pod_cut, "End of POD"), |
52 |
- MP_CMD_DIR_RAW_ARGS_ON_READ("__END__", END, "Stop reading config"), |
53 |
+ MP_CMD_SRV_RAW_ARGS_ON_READ("=pod", pod, "Start of POD"), |
54 |
+ MP_CMD_SRV_RAW_ARGS_ON_READ("=back", pod, "End of =over"), |
55 |
+ MP_CMD_SRV_RAW_ARGS_ON_READ("=cut", pod_cut, "End of POD"), |
56 |
+ MP_CMD_SRV_RAW_ARGS_ON_READ("__END__", END, "Stop reading config"), |
57 |
|
58 |
MP_CMD_SRV_RAW_ARGS("PerlLoadModule", load_module, "A Perl module"), |
59 |
#ifdef MP_TRACE |
60 |
|
61 |
|
62 |
|