Преглед изворни кода

[index] Fixes a bug where requests could result in same cache file names

Previously the cache file name was only build upon bridge
parameters. If two bridges don't make use of any parameter
this would result into equal file names.
logmanoriginal пре 7 година
родитељ
комит
85149add61
1 измењених фајлова са 6 додато и 6 уклоњено
  1. 6 6
      index.php

+ 6 - 6
index.php

@@ -125,18 +125,18 @@ try {
 			define('NOPROXY',true);
 		}
 
-		$params = $_GET;
-		unset($params['action']);
-		unset($params['bridge']);
-		unset($params['format']);
-		unset($params['_noproxy']);
-
 		// Initialize cache
 		$cache = Cache::create('FileCache');
 		$cache->setPath(CACHE_DIR);
 		$cache->purgeCache(86400); // 24 hours
 		$cache->setParameters($params);
 
+		$params = $_GET;
+		unset($params['action']);
+		unset($params['bridge']);
+		unset($params['format']);
+		unset($params['_noproxy']);
+
 		// Load cache & data
 		$bridge->setCache($cache);
 		$bridge->setDatas($params);