aboutsummaryrefslogtreecommitdiffstats
path: root/config/apache_mod_security/apache_mod_security.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-06-23 19:39:34 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-06-23 19:39:34 -0400
commit077e3bc34b94a8f0cb0c09d7034ab9c09a22dfbe (patch)
tree616e3e51ad5b098bf38b9638c66b8fad1d8c8f54 /config/apache_mod_security/apache_mod_security.inc
parent3bc3b925d9dbd05552d21b7465731d3b823eb515 (diff)
downloadpfsense-packages-077e3bc34b94a8f0cb0c09d7034ab9c09a22dfbe.tar.gz
pfsense-packages-077e3bc34b94a8f0cb0c09d7034ab9c09a22dfbe.tar.bz2
pfsense-packages-077e3bc34b94a8f0cb0c09d7034ab9c09a22dfbe.zip
Ensure that we append a / if it does not exist.
Diffstat (limited to 'config/apache_mod_security/apache_mod_security.inc')
-rw-r--r--config/apache_mod_security/apache_mod_security.inc17
1 files changed, 14 insertions, 3 deletions
diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc
index cf39e467..2f533b0d 100644
--- a/config/apache_mod_security/apache_mod_security.inc
+++ b/config/apache_mod_security/apache_mod_security.inc
@@ -116,8 +116,13 @@ EOF;
foreach($ams['row'] as $row)
$additionalsitehostnames .= "{$row['additionalsitehostnames']} ";
$backend_sites = "";
- foreach($ams['row'] as $row)
- $backend_sites .= "{$row['webserveripaddr']} ";
+ foreach($ams['row'] as $row) {
+ $backend_sites .= "{$row['webserveripaddr']}";
+ if(substr($row['webserveripaddr'],count($row['webserveripaddr']),1) != "/")
+ $backend_sites .= "/ ";
+ else
+ $backend_sites .= " ";
+ }
// Set general items
if($ams['siteemail'])
$serveradmin = $ams['siteemail'];
@@ -160,8 +165,11 @@ EOF;
}
}
+ if($config['installedpackages']['apachemodsecuritysettings']['config'][0]['modsecuritycustom'])
+ $mod_security_custom = $config['installedpackages']['apachemodsecuritysettings']['config'][0]['modsecuritycustom'];
+
// Mod_security enabled?
- if($config['installedpackages']['apachemodsecuritysettings']['config']['enablemodsecurity']) {
+ if($config['installedpackages']['apachemodsecuritysettings']['config'][0]['enablemodsecurity']) {
$enable_mod_security = true;
$mod_security = <<< EOF
<IfModule mod_security.c>
@@ -286,9 +294,12 @@ EOF;
#phpMyAdmin path vln
SecFilterSelective REQUEST_URI "/css/phpmyadmin\.css\.php\?GLOBALS\[cfg\]\[ThemePath\]=/etc"
+ {$mod_security_custom}
+
</IfModule>
EOF;
+
}
$apache_config = <<<EOF