aboutsummaryrefslogtreecommitdiffstats
path: root/testing/apache2-mod-perl/mod_perl-2.0.10-restrict_perl_section_to_server_scope.patch
blob: 79dc46cfae43e7a1e485efe8a9566f73feba9ea3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From jani@ulrik.uio.no Wed Oct 05 09:38:47 2011
To: 644169@bugs.debian.org
Subject: Re: Bug#644169: libapache2-mod-perl2: PerlOptions -Sections not
 permitted in server config, but should be
From: Jan Ingvoldstad <jani+debian-2011+@ifi.uio.no>
Date: Wed, 05 Oct 2011 11:38:37 +0200
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=utf-8

Here is a patch that ensures that <Perl> (and Pod) sections are only
allowed in the server configuration and not per directory, which
incidentally matches the specification table here:

http://perl.apache.org/docs/2.0/user/config/config.html#mod_perl_Directives_Argument_Types_and_Allowed_Location

The patch has been tested on the same system where I identified the
problem.

The patch solves the issue for me, and leaves only the following
issues, as far as I can tell:

 - Should there be fine-grained control as "PerlOptions -Sections"
   implies or not?

 - The mod_perl documentation (online and in the module) probably
   needs to be changed to reflect that PerlOptions -Sections does not
   work.

Description: allow Perl and Pod sections only in server config
Author: Jan Ingvoldstad <jani+debian-mod-perl-2011+@ifi.uio.no>
Last-Update: 2011-10-05
--- a/src/modules/perl/mod_perl.c	2011-02-02 21:23:45.000000000 +0100
+++ b/src/modules/perl/mod_perl.c	2011-10-05 11:05:52.977576861 +0200
@@ -913,18 +913,18 @@
     MP_CMD_DIR_ITERATE2("PerlAddVar", add_var, "PerlAddVar"),
     MP_CMD_DIR_TAKE2("PerlSetEnv", set_env, "PerlSetEnv"),
     MP_CMD_SRV_TAKE1("PerlPassEnv", pass_env, "PerlPassEnv"),
-    MP_CMD_DIR_RAW_ARGS_ON_READ("<Perl", perl, "Perl Code"),
-    MP_CMD_DIR_RAW_ARGS("Perl", perldo, "Perl Code"),
+    MP_CMD_SRV_RAW_ARGS_ON_READ("<Perl", perl, "Perl Code"),
+    MP_CMD_SRV_RAW_ARGS("Perl", perldo, "Perl Code"),
 
     MP_CMD_DIR_TAKE1("PerlSetInputFilter", set_input_filter,
                      "filter[;filter]"),
     MP_CMD_DIR_TAKE1("PerlSetOutputFilter", set_output_filter,
                      "filter[;filter]"),
 
-    MP_CMD_DIR_RAW_ARGS_ON_READ("=pod", pod, "Start of POD"),
-    MP_CMD_DIR_RAW_ARGS_ON_READ("=back", pod, "End of =over"),
-    MP_CMD_DIR_RAW_ARGS_ON_READ("=cut", pod_cut, "End of POD"),
-    MP_CMD_DIR_RAW_ARGS_ON_READ("__END__", END, "Stop reading config"),
+    MP_CMD_SRV_RAW_ARGS_ON_READ("=pod", pod, "Start of POD"),
+    MP_CMD_SRV_RAW_ARGS_ON_READ("=back", pod, "End of =over"),
+    MP_CMD_SRV_RAW_ARGS_ON_READ("=cut", pod_cut, "End of POD"),
+    MP_CMD_SRV_RAW_ARGS_ON_READ("__END__", END, "Stop reading config"),
 
     MP_CMD_SRV_RAW_ARGS("PerlLoadModule", load_module, "A Perl module"),
 #ifdef MP_TRACE