[Mapbender-commits] r7621 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Feb 17 05:18:39 EST 2011
Author: armin11
Date: 2011-02-17 02:18:39 -0800 (Thu, 17 Feb 2011)
New Revision: 7621
Modified:
trunk/mapbender/http/php/mod_callMetadata.php
trunk/mapbender/http/php/mod_getWmcDisclaimer.php
trunk/mapbender/http/php/tagCloud.php
Log:
rewind - bug
Modified: trunk/mapbender/http/php/mod_callMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_callMetadata.php 2011-02-17 10:03:01 UTC (rev 7620)
+++ trunk/mapbender/http/php/mod_callMetadata.php 2011-02-17 10:18:39 UTC (rev 7621)
@@ -238,18 +238,14 @@
$outputFormat = $testMatch;
$testMatch = NULL;
}
-//TODO give requesting hostname to this script
-//script check if request param hostname is in whitelist - when not it will be $_SERVER['HTTP_HOST']
if (isset($_REQUEST["hostName"]) & $_REQUEST["hostName"] != "") {
$testMatch = $_REQUEST["hostName"];
- if (isset(HOSTNAME_WHITELIST) & HOSTNAME_WHITELIST != '') {
- if (!in_array($testMatch,explode(',',HOSTNAME_WHITELIST))){
- echo 'hostName: <b>'.$testMatch.'</b> is not valid.<br/>';
- die();
- }
- $hostName = $testMatch;
- $testMatch = NULL;
- }
+ if (!($testMatch == 'www.geoportal.rlp' or $testMatch == 'www.geoportal.rlp.de' or $testMatch == 'geoportal.rlp' or $testMatch == '10.7.101.151' or $testMatch == 'localhost:16580' or $testMatch == 'localhost' or $testMatch == 'www.gdi-rp-dienste3.rlp.de' or $testMatch == '10.7.101.252' )){
+ echo 'hostName: <b>'.$testMatch.'</b> is not valid.<br/>';
+ die();
+ }
+ $hostName = $testMatch;
+ $testMatch = NULL;
}
if (isset($_REQUEST["orderBy"]) & $_REQUEST["orderBy"] != "") {
$testMatch = $_REQUEST["orderBy"];
Modified: trunk/mapbender/http/php/mod_getWmcDisclaimer.php
===================================================================
--- trunk/mapbender/http/php/mod_getWmcDisclaimer.php 2011-02-17 10:03:01 UTC (rev 7620)
+++ trunk/mapbender/http/php/mod_getWmcDisclaimer.php 2011-02-17 10:18:39 UTC (rev 7621)
@@ -33,17 +33,14 @@
$testMatch = NULL;
}
//TODO give requesting hostname to this script
-//script check if request param hostname is in whitelist - when not it will be $_SERVER['HTTP_HOST']
if (isset($_REQUEST["hostName"]) & $_REQUEST["hostName"] != "") {
$testMatch = $_REQUEST["hostName"];
- if (isset(HOSTNAME_WHITELIST) & HOSTNAME_WHITELIST != '') {
- if (!in_array($testMatch,explode(',',HOSTNAME_WHITELIST))){
- echo 'hostName: <b>'.$testMatch.'</b> is not valid.<br/>';
- die();
- }
- $hostName = $testMatch;
- $testMatch = NULL;
- }
+ if (!($testMatch == 'www.geoportal.rlp' or $testMatch == 'www.geoportal.rlp.de' or $testMatch == 'geoportal.rlp' or $testMatch == '10.7.101.165' or $testMatch == '10.7.101.151' or $testMatch == 'localhost' or $testMatch == 'www.gdi-rp-dienste3.rlp.de' or $testMatch == '10.7.101.252' )){
+ echo 'hostName: <b>'.$testMatch.'</b> is not valid.<br/>';
+ die();
+ }
+ $hostName = $testMatch;
+ $testMatch = NULL;
}
$e = new mb_exception("mod_getWmcDisclaimer.php: requested wmc id: ".$_REQUEST["id"]);
//
Modified: trunk/mapbender/http/php/tagCloud.php
===================================================================
--- trunk/mapbender/http/php/tagCloud.php 2011-02-17 10:03:01 UTC (rev 7620)
+++ trunk/mapbender/http/php/tagCloud.php 2011-02-17 10:18:39 UTC (rev 7621)
@@ -72,20 +72,20 @@
}
//
-//TODO give requesting hostname to this script
-//script check if request param hostname is in whitelist - when not it will be $_SERVER['HTTP_HOST']
if (isset($_REQUEST["hostName"]) & $_REQUEST["hostName"] != "") {
+ //validate to some hosts
$testMatch = $_REQUEST["hostName"];
- if (isset(HOSTNAME_WHITELIST) & HOSTNAME_WHITELIST != '') {
- if (!in_array($testMatch,explode(',',HOSTNAME_WHITELIST))){
- echo 'hostName: <b>'.$testMatch.'</b> is not valid.<br/>';
- die();
- }
- $hostName = $testMatch;
- $testMatch = NULL;
- }
+ if (!($testMatch == 'www.geoportal.rlp' or $testMatch == 'www.geoportal.rlp.de' or $testMatch == 'www.gdi-rp-dienste3.rlp.de' or $testMatch == '10.7.101.151' or $testMatch == '10.7.101.252' )){
+ echo 'hostName: <b>'.$testMatch.'</b> is not a valid server of gdi-rp.<br/>';
+ die();
+ }
+ $hostName = $testMatch;
+ $testMatch = NULL;
}
+
+
+
if ($outputFormat == 'json'){
$classJSON = new Mapbender_JSON;
}
More information about the Mapbender_commits
mailing list