aboutsummaryrefslogtreecommitdiffstats
path: root/config/apache_mod_security
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-06-24 16:55:21 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-06-24 16:55:21 -0400
commit48d2c2c00339c1f60004b6760bf69ff015a66b75 (patch)
tree6a675a7fb398347d53bb90397bbad596a73116df /config/apache_mod_security
parent5f73b42e72fc12bb23b6a08b1950da1fc1d0a0dc (diff)
downloadpfsense-packages-48d2c2c00339c1f60004b6760bf69ff015a66b75.tar.gz
pfsense-packages-48d2c2c00339c1f60004b6760bf69ff015a66b75.tar.bz2
pfsense-packages-48d2c2c00339c1f60004b6760bf69ff015a66b75.zip
Ensure that host has at least http:// or https:// in front
Diffstat (limited to 'config/apache_mod_security')
-rw-r--r--config/apache_mod_security/apache_mod_security.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc
index a7c3ceae..c571e435 100644
--- a/config/apache_mod_security/apache_mod_security.inc
+++ b/config/apache_mod_security/apache_mod_security.inc
@@ -222,7 +222,11 @@ EOF;
$additionalsitehostnames .= "{$row['additionalsitehostnames']} ";
$backend_sites = ""; // not technically needed. added for readability due to .='s
foreach($ams['row'] as $row) {
+ // Ensure leading http(s)://
+ if(!strstr($row['webserveripaddr'], "http"))
+ $backend_sites .= "http://";
$backend_sites .= "{$row['webserveripaddr']}";
+ // Ensure trailing /
if(substr($row['webserveripaddr'],count($row['webserveripaddr']),1) != "/")
$backend_sites .= "/ ";
else