bug_1007.diff

Administrator Admin, 2008-04-04 00:23

Download (2.3 kB)

 
t3lib/class.t3lib_tstemplate.php (Arbeitskopie)
1148 1148

  
1149 1149
			// find
1150 1150
		if (strstr($file,'/')) {	// here it is manual media
1151
			if(!strcmp(substr($file,0,6),'media/')) $file = 'typo3/sysext/cms/tslib/'.$file;
1152
			if (@is_file($this->getFileName_backPath.$file))	{
1151
			if (!strcmp(substr($file,0,6),'media/')) {
1152
				$file = 'typo3/sysext/cms/tslib/'.$file;
1153
			}
1154
			if (@is_file($this->getFileName_backPath.$file)) {
1153 1155
				$outFile = $file;
1154 1156
				$fileInfo = t3lib_div::split_fileref($outFile);
1155
				reset($this->allowedPaths);
1156
				$OK=0;
1157
				while(list(,$val)=each($this->allowedPaths))	{
1158
					if (substr($fileInfo['path'],0,strlen($val))==$val){$OK=1; break;}
1157
				$OK = 0;
1158
				foreach ($this->allowedPaths as $val) {
1159
					if (substr($fileInfo['path'],0,strlen($val))==$val) {
1160
						$OK = 1;
1161
						break;
1162
					}
1159 1163
				}
1160 1164
				if ($OK)	{
1161
					$this->fileCache[$hash]=$outFile;
1165
					$this->fileCache[$hash] = $outFile;
1162 1166
					return $outFile;
1163 1167
				} elseif ($this->tt_track) $GLOBALS['TT']->setTSlogMessage('"'.$file.'" was not located in the allowed paths: ('.implode(',',$this->allowedPaths).')',3);
1164 1168
			} elseif ($this->tt_track) $GLOBALS['TT']->setTSlogMessage('"'.$this->getFileName_backPath.$file.'" is not a file (non-uploads/.. resource, did not exist).',3);
typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie)
1801 1801
		$this->tmpl = t3lib_div::makeInstance('t3lib_TStemplate');
1802 1802
		$this->tmpl->init();
1803 1803
		$this->tmpl->tt_track= $this->beUserLogin ? 1 : 0;
1804
		$this->tmpl->getFileName_backPath = PATH_site;
1804 1805
	}
1805 1806

  
1806 1807
	/**
typo3/sysext/cms/tslib/pagegen.php (Arbeitskopie)
60 60
$temp_incFiles=TSpagegen::getIncFiles();
61 61
reset($temp_incFiles);
62 62
while(list(,$temp_file)=each($temp_incFiles))	{
63
	include_once('./'.$temp_file);
63
	include_once(PATH_site.$temp_file);
64 64
}
65 65

  
66 66