/srv/www/limesurvey6/application/models/Token.php(315)
303 return $token; 304 } 305 306 /** 307 * Sanitize token show to the user (replace sanitize_helper sanitize_token) 308 * @param string $token to sanitize 309 * @return string sanitized token 310 */ 311 public static function sanitizeToken($token) 312 { 313 // According to Yii doc : http://www.yiiframework.com/doc/api/1.1/CSecurityManager#generateRandomString-detail 314 $pattern = Yii::app()->getConfig("allowedcharacters_pattern_token"); 315 return preg_replace($pattern, '', $token); 316 } 317 318 /** 319 * Sanitize string for any attribute 320 * @param string $attribute to sanitize 321 * @return string sanitized attribute 322 */ 323 public static function sanitizeAttribute($attribute) 324 { 325 // TODO: Use HTML Purifier? 326 return filter_var($attribute, @FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES); 327 }
| #0 |
+
–
/srv/www/limesurvey6/application/models/Token.php(315): preg_replace("/[^0-9a-zA-Z_\-~]/", "", null) 310 */ 311 public static function sanitizeToken($token) 312 { 313 // According to Yii doc : http://www.yiiframework.com/doc/api/1.1/CSecurityManager#generateRandomString-detail 314 $pattern = Yii::app()->getConfig("allowedcharacters_pattern_token"); 315 return preg_replace($pattern, '', $token); 316 } 317 318 /** 319 * Sanitize string for any attribute 320 * @param string $attribute to sanitize |
| #1 |
+
–
/srv/www/limesurvey6/vendor/yiisoft/yii/framework/validators/CFilterValidator.php(47): Token::sanitizeToken(null) 42 */ 43 protected function validateAttribute($object,$attribute) 44 { 45 if($this->filter===null || !is_callable($this->filter)) 46 throw new CException(Yii::t('yii','The "filter" property must be specified with a valid callback.')); 47 $object->$attribute=call_user_func_array($this->filter,array($object->$attribute)); 48 } 49 } |
| #2 |
+
–
/srv/www/limesurvey6/vendor/yiisoft/yii/framework/validators/CValidator.php(201): CFilterValidator->validateAttribute(Token_215234, "token") 196 else 197 $attributes=$this->attributes; 198 foreach($attributes as $attribute) 199 { 200 if(!$this->skipOnError || !$object->hasErrors($attribute)) 201 $this->validateAttribute($object,$attribute); 202 } 203 } 204 205 /** 206 * Returns the JavaScript needed for performing client-side validation. |
| #3 |
+
–
/srv/www/limesurvey6/vendor/yiisoft/yii/framework/base/CModel.php(159): CValidator->validate(Token_215234, array("token")) 154 if($clearErrors) 155 $this->clearErrors(); 156 if($this->beforeValidate()) 157 { 158 foreach($this->getValidators() as $validator) 159 $validator->validate($this,$attributes); 160 $this->afterValidate(); 161 return !$this->hasErrors(); 162 } 163 else 164 return false; |
| #4 |
+
–
/srv/www/limesurvey6/application/models/LSActiveRecord.php(454): CModel->validate() 449 */ 450 public function encryptSave($runValidation = false) 451 { 452 // run validation on attribute values before encryption take place, it is impossible to validate encrypted values 453 if ($runValidation) { 454 if (!$this->validate()) { 455 return false; 456 } 457 } 458 459 // encrypt attributes |
| #5 |
+
–
/srv/www/limesurvey6/application/controllers/admin/Tokens.php(2435): LSActiveRecord->encryptSave(true) 2430 $oToken->scenario = 'allowinvalidemail'; 2431 } 2432 foreach ($aWriteArray as $key => $value) { 2433 $oToken->$key = $value; 2434 } 2435 if (!$oToken->encryptSave(true)) { 2436 $aModelErrorList[] = array('line' => $iRecordCount, 'errors' => CHtml::errorSummary($oToken, '', '', ['class' => 'text-start'])); 2437 } else { 2438 $bImportDone = true; 2439 } 2440 } |
| #6 |
unknown(0): Tokens->import(215234)
|
| #7 |
+
–
/srv/www/limesurvey6/vendor/yiisoft/yii/framework/web/actions/CAction.php(114): ReflectionMethod->invokeArgs(Tokens, array(215234)) 109 elseif($param->isDefaultValueAvailable()) 110 $ps[]=$param->getDefaultValue(); 111 else 112 return false; 113 } 114 $method->invokeArgs($object,$ps); 115 return true; 116 } 117 } |
| #8 |
+
–
/srv/www/limesurvey6/application/core/SurveyCommonAction.php(83): CAction->runWithParamsInternal(Tokens, ReflectionMethod, array("surveyid" => 215234, "sa" => "import", "iSurveyId" => 215234, "iSurveyID" => 215234, ...)) 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 |
| #9 |
+
–
/srv/www/limesurvey6/vendor/yiisoft/yii/framework/web/CController.php(308): SurveyCommonAction->runWithParams(array("surveyid" => 215234, "sa" => "import", "iSurveyId" => 215234, "iSurveyID" => 215234, ...)) 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; |
| #10 |
+
–
/srv/www/limesurvey6/vendor/yiisoft/yii/framework/web/CController.php(286): CController->runAction(Tokens) 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(); |
| #11 |
+
–
/srv/www/limesurvey6/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters(Tokens, 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); |
| #12 |
+
–
/srv/www/limesurvey6/application/controllers/AdminController.php(204): CController->run("tokens") 199 $this->runModuleController($action); 200 // this will redirect the default action to the new controller previously "admin/index" or "admin" to "dashboard/view" 201 if (empty($action) || $action === 'index') { 202 $this->redirect($this->createUrl('dashboard/view')); 203 } 204 return parent::run($action); 205 } 206 207 /** 208 * Starting with LS4, 3rd party developer can extends any of the LimeSurve controllers. 209 * |
| #13 |
+
–
/srv/www/limesurvey6/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): AdminController->run("tokens") 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))); |
| #14 |
+
–
/srv/www/limesurvey6/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/tokens/sa/import") 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. |
| #15 |
+
–
/srv/www/limesurvey6/vendor/yiisoft/yii/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 /** |
| #16 |
+
–
/srv/www/limesurvey6/index.php(161): CApplication->run() 156 require_once APPPATH . 'core/LSYii_Application' . EXT; 157 158 $config = require_once(APPPATH . 'config/internal' . EXT); 159 160 Yii::$enableIncludePath = false; 161 Yii::createApplication('LSYii_Application', $config)->run(); 162 163 /* End of file index.php */ 164 /* Location: ./index.php */ |