Difference between revisions of "Zen Cart application top"
From Wiki @ Karl Jones dot com
Karl Jones (Talk | contribs) (Created page with "In Zen Cart, '''application_top.php''' is a core file. <pre> <?php /** * application_top.php Common actions carried out at the start of each page invocation. * * Initi...") |
Karl Jones (Talk | contribs) |
||
| Line 33: | Line 33: | ||
$paramsTo | $paramsTo | ||
</pre> | </pre> | ||
| + | |||
| + | == See also == | ||
| + | |||
| + | * [[Zen Cart]] | ||
| + | |||
| + | [[Category:Zen Cart]] | ||
Latest revision as of 10:21, 21 April 2016
In Zen Cart, application_top.php is a core file.
<?php
/**
* application_top.php Common actions carried out at the start of each page invocation.
*
* Initializes common classes & methods. Controlled by an array which describes
* the elements to be initialised and the order in which that happens.
* see {@link http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials} for more details.
*
* @package initSystem
* @copyright Copyright 2003-2013 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version GIT: $Id: Author: Ian Wilson Sun Dec 30 15:16:17 2012 +0000 Modified in v1.5.2 $
*/
/**
* inoculate against hack attempts which waste CPU cycles
*/
$contaminated = (isset($_FILES['GLOBALS']) || isset($_REQUEST['GLOBALS'])) ? true : false;
$paramsToAvoid = array('GLOBALS', '_COOKIE', '_ENV', '_FILES', '_GET', '_POST', '_REQUEST', '_SERVER', '_SESSION', 'HTTP_COOKIE_VARS', 'HTTP_ENV_VARS', 'HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_POST_FILES', 'HTTP_RAW_POST_DATA', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS');
$paramsToAvoid[] = 'autoLoadConfig';
$paramsToAvoid[] = 'mosConfig_absolute_path';
$paramsToAvoid[] = 'hash';
$paramsToAvoid[] = 'main';
foreach($paramsToAvoid as $key) {
if (isset($_GET[$key]) || isset($_POST[$key]) || isset($_COOKIE[$key])) {
$contaminated = true;
break;
}
}
$paramsTo