/mnt/data/shnoulle/nginx/www/3LTS/application/helpers/common_helper.php(5056)
5044 function get_zip_originalsize($filename) 5045 { 5046 5047 if (class_exists('ZipArchive')) { 5048 $size = 0; 5049 $zip = new ZipArchive; 5050 $zip->open($filename); 5051 5052 for ($i = 0; $i < $zip->numFiles; $i++) { 5053 $aEntry = $zip->statIndex($i); 5054 $size += $aEntry['size']; 5055 } 5056 $zip->close(); 5057 return $size; 5058 }else{ 5059 if ( YII_DEBUG ){ 5060 Yii::app()->setFlashMessage("Warning! The PHP Zip extension is not installed on this server. You're not protected from ZIP bomb attacks.", 'error'); 5061 } 5062 } 5063 5064 return -1; 5065 } 5066 5067 /** 5068 * PHP7 has created a little nasty bomb with count throwing erroros on uncountables
#0 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/application/helpers/common_helper.php(5056): ZipArchive->close() 5051 5052 for ($i = 0; $i < $zip->numFiles; $i++) { 5053 $aEntry = $zip->statIndex($i); 5054 $size += $aEntry['size']; 5055 } 5056 $zip->close(); 5057 return $size; 5058 }else{ 5059 if ( YII_DEBUG ){ 5060 Yii::app()->setFlashMessage("Warning! The PHP Zip extension is not installed on this server. You're not protected from ZIP bomb attacks.", 'error'); 5061 } |
#1 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/application/helpers/common_helper.php(5035): get_zip_originalsize("/mnt/data/shnoulle/nginx/www/3LTS/tmp/errorpage_vanilla.zip") 5030 * @param string $zip_filename 5031 * @return int 5032 */ 5033 function isZipBomb($zip_filename) 5034 { 5035 return ( get_zip_originalsize($zip_filename) > Yii::app()->getConfig('maximum_unzipped_size') ); 5036 } 5037 5038 /** 5039 * Get the original size of a zip archive to prevent Zip Bombing 5040 * see comment here : http://php.net/manual/en/function.zip-entry-filesize.php |
#2 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/application/third_party/pclzip/pclzip.lib.php(226): isZipBomb("/mnt/data/shnoulle/nginx/www/3LTS/tmp/errorpage_vanilla.zip") 221 die('Abort '.basename(__FILE__).' : Missing zlib extensions'); 222 } 223 224 225 // Added by LS Team to prevent Zip Bombing 226 if ($bCheckZipBomb && isZipBomb($p_zipname)){ 227 die('Abort '.basename(__FILE__).' : Unzipped file is bigger than upload_max_filesize or post_max_size'); 228 } 229 230 231 // ----- Set the attributes |
#3 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/application/controllers/admin/themes.php(57): PclZip->__construct("/mnt/data/shnoulle/nginx/www/3LTS/tmp/errorpage_vanilla.zip") 52 $templatedir = $oEditedTemplate->path; 53 $tempdir = Yii::app()->getConfig('tempdir'); 54 55 $zipfile = "$tempdir/$templatename.zip"; 56 Yii::app()->loadLibrary('admin.pclzip'); 57 $zip = new PclZip($zipfile); 58 $zip->create($templatedir, PCLZIP_OPT_REMOVE_PATH, $oEditedTemplate->path); 59 60 if (is_file($zipfile)) { 61 // Send the file for download! 62 header("Expires: 0"); |
#4 |
unknown(0): themes->templatezip("errorpage_vanilla")
|
#5 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/framework/web/actions/CAction.php(115): ReflectionMethod->invokeArgs(themes, array("errorpage_vanilla")) 110 elseif($param->isDefaultValueAvailable()) 111 $ps[]=$param->getDefaultValue(); 112 else 113 return false; 114 } 115 $method->invokeArgs($object,$ps); 116 return true; 117 } 118 } |
#6 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/application/core/Survey_Common_Action.php(83): CAction->runWithParamsInternal(themes,
ReflectionMethod, array("r" =>
"admin/themes/sa/templatezip/templatename/errorpage_vanilla", "sa" =>
"templatezip", "templatename" => "errorpage_vanilla")) 78 $oMethod = new ReflectionMethod($this, $sDefault); 79 } 80 81 // We're all good to go, let's execute it 82 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params 83 return parent::runWithParamsInternal($this, $oMethod, $params); 84 } 85 86 /** 87 * Some functions have different parameters, which are just an alias of the 88 * usual parameters we're getting in the url. This function just populates |
#7 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/application/controllers/admin/themes.php(33): Survey_Common_Action->runWithParams(array("r"
=> "admin/themes/sa/templatezip/templatename/errorpage_vanilla",
"sa" => "templatezip", "templatename" => "errorpage_vanilla")) 28 public function runWithParams($params) 29 { 30 31 $sTemplateName = Yii::app()->request->getPost('templatename', ''); 32 if (Permission::model()->hasGlobalPermission('templates', 'read') || Permission::model()->hasTemplatePermission($sTemplateName)) { 33 parent::runWithParams($params); 34 } else { 35 Yii::app()->setFlashMessage(gT("We are sorry but you don't have permissions to do this."), 'error'); 36 $this->getController()->redirect(array("admin/themeoptions")); 37 } 38 } |
#8 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/framework/web/CController.php(308): themes->runWithParams(array("r"
=> "admin/themes/sa/templatezip/templatename/errorpage_vanilla",
"sa" => "templatezip", "templatename" => "errorpage_vanilla")) 303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
#9 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/framework/web/CController.php(286): CController->runAction(themes) 281 * @see runAction 282 */ 283 public function runActionWithFilters($action,$filters) 284 { 285 if(empty($filters)) 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); |
#10 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/framework/web/CController.php(265): CController->runActionWithFilters(themes, array()) 260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
#11 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/application/controllers/AdminController.php(165): CController->run("themes") 160 $this->redirect(array('/admin/authentication/sa/login')); 161 } 162 } 163 } 164 165 return parent::run($action); 166 } 167 168 /** 169 * Routes all the actions to their respective places 170 * |
#12 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/framework/web/CWebApplication.php(282): AdminController->run("themes") 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
#13 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/themes/sa/templatezip/templatename/errorpage_vanilla") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
#14 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/framework/base/CApplication.php(185): CWebApplication->processRequest() 180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
#15 |
+
–
/mnt/data/shnoulle/nginx/www/3LTS/index.php(194): CApplication->run() 189 require_once APPPATH . 'core/LSYii_Application' . EXT; 190 191 $config = require_once(APPPATH . 'config/internal' . EXT); 192 193 Yii::$enableIncludePath = false; 194 Yii::createApplication('LSYii_Application', $config)->run(); 195 196 /* End of file index.php */ 197 /* Location: ./index.php */ |