Whoops, I forgot to include a regex fix in lib/TWiki.cfg in the last
patch.  Here's an updated patch.

This time, I've attached the file that goes into debian/patches rather
than a patch that adds a patch to debian/patches.  Sorry if the last one
caused any confusion...

Thanks,
John Wright

=== modified file 'debian/apache.conf'
--- debian/apache.conf  2006-08-24 19:13:04 +0000
+++ debian/apache.conf  2006-08-24 19:16:54 +0000
@@ -12,4 +12,23 @@
     Allow from all
 </Directory>
 
+<Directory "/var/www/twiki/pub">
+    Options None
+    AllowOverride None
+    Allow from all
+
+    # Disable interpreting of php in the pub directory
+    <IfModule mod_php4.c>
+        php_admin_flag engine off
+    </IfModule>
+    <IfModule mod_php3.c>
+        php3_engine off
+    </IfModule>
+  
+    # This line will redefine the mime type for the most common 
+    # types of scripts. It will also deliver HTML files as if 
+    # they are text files
+    AddType text/plain .html .htm .shtml .php .php3 .phtml .phtm .pl .py .cgi
+</Directory> 
+
 # End twiki Configuration Block

=== modified file 'lib/TWiki.cfg'
--- lib/TWiki.cfg       2006-08-24 19:13:04 +0000
+++ lib/TWiki.cfg       2006-08-24 19:16:33 +0000
@@ -116,7 +116,7 @@
 #                  WARNING: Be sure to update this list with any
 #                  configuration or script filetypes that are
 #                  automatically run by your web server
-$uploadFilter       = "^(\.htaccess|.*\.(?:php[0-9s]?|phtm[l]?|pl|py|cgi))\$";
+$uploadFilter = 
"^(\.htaccess|.*\.(?i)(?:php[0-9s]?(\..*)?|[sp]htm[l]?(\..*)?|pl|py|cgi))\$"
 #                   Set ENV{'PATH'} explicitly for taint checks ( #!perl -T 
option ) :
 #                   (Note: PATH environment variable is not changed if set to 
"")
 # $safeEnvPath - safe operating system PATH setting for use by TWiki scripts.

Reply via email to