/var/www/limesurvey/framework/vendors/htmlpurifier/HTMLPurifier.standalone.php(1898)
1886 * Namespace.Directive => Value 1887 * @param $config_array Configuration associative array 1888 */ 1889 public function loadArray($config_array) { 1890 if ($this->isFinalized('Cannot load directives after finalization')) return; 1891 foreach ($config_array as $key => $value) { 1892 $key = str_replace('_', '.', $key); 1893 if (strpos($key, '.') !== false) { 1894 $this->set($key, $value); 1895 } else { 1896 $namespace = $key; 1897 $namespace_values = $value; 1898 foreach ($namespace_values as $directive => $value) { 1899 $this->set($namespace .'.'. $directive, $value); 1900 } 1901 } 1902 } 1903 } 1904 1905 /** 1906 * Returns a list of array(namespace, directive) for all directives 1907 * that are allowed in a web-form context as per an allowed 1908 * namespaces/directives list. 1909 * @param $allowed List of allowed namespaces/directives 1910 */
#0 |
+
–
/var/www/limesurvey/framework/vendors/htmlpurifier/HTMLPurifier.standalone.php(1483): HTMLPurifier_Config->loadArray(array("AutoFormat.RemoveEmpty"
=> false, "CSS.AllowTricky" => true, "HTML.SafeObject" =>
true, "Output.FlashCompat" => true, ...)) 1478 $ret = HTMLPurifier_Config::createDefault(); 1479 } else { 1480 $ret = new HTMLPurifier_Config($schema); 1481 } 1482 if (is_string($config)) $ret->loadIni($config); 1483 elseif (is_array($config)) $ret->loadArray($config); 1484 return $ret; 1485 } 1486 1487 /** 1488 * Creates a new config object that inherits from a previous one. |
#1 |
+
–
/var/www/limesurvey/framework/vendors/htmlpurifier/HTMLPurifier.standalone.php(110): HTMLPurifier_Config::create(array("AutoFormat.RemoveEmpty"
=> false, "CSS.AllowTricky" => true, "HTML.SafeObject" =>
true, "Output.FlashCompat" => true, ...)) 105 * The parameter can also be any type that 106 * HTMLPurifier_Config::create() supports. 107 */ 108 public function __construct($config = null) { 109 110 $this->config = HTMLPurifier_Config::create($config); 111 112 $this->strategy = new HTMLPurifier_Strategy_Core(); 113 114 } 115 |
#2 |
+
–
/var/www/limesurvey/framework/web/widgets/CHtmlPurifier.php(126): HTMLPurifier->__construct(array("AutoFormat.RemoveEmpty"
=> false, "CSS.AllowTricky" => true, "HTML.SafeObject" =>
true, "Output.FlashCompat" => true, ...)) 121 * Create a new HTML Purifier instance. 122 * @return HTMLPurifier 123 */ 124 protected function createNewHtmlPurifierInstance() 125 { 126 $this->_purifier=new HTMLPurifier($this->getOptions()); 127 $this->_purifier->config->set('Cache.SerializerPath',Yii::app()->getRuntimePath()); 128 return $this->_purifier; 129 } 130 } |
#3 |
+
–
/var/www/limesurvey/framework/web/widgets/CHtmlPurifier.php(96): CHtmlPurifier->createNewHtmlPurifierInstance() 091 * @return CHtmlPurifier 092 */ 093 public function setOptions($options) 094 { 095 $this->_options=$options; 096 $this->createNewHtmlPurifierInstance(); 097 return $this; 098 } 099 100 /** 101 * Get the options for the HTML Purifier instance. |
#4 |
+
–
/var/www/limesurvey/framework/base/CComponent.php(152): CHtmlPurifier->setOptions(array("AutoFormat.RemoveEmpty"
=> false, "CSS.AllowTricky" => true, "HTML.SafeObject" =>
true, "Output.FlashCompat" => true, ...)) 147 */ 148 public function __set($name,$value) 149 { 150 $setter='set'.$name; 151 if(method_exists($this,$setter)) 152 return $this->$setter($value); 153 elseif(strncasecmp($name,'on',2)===0 && method_exists($this,$name)) 154 { 155 // duplicating getEventHandlers() here for performance 156 $name=strtolower($name); 157 if(!isset($this->_e[$name])) |
#5 |
+
–
/var/www/limesurvey/application/core/LSYii_Validators.php(105): CComponent->__set("options",
array("AutoFormat.RemoveEmpty" => false, "CSS.AllowTricky" =>
true, "HTML.SafeObject" => true, "Output.FlashCompat" => true,
...)) 100 * @param string $value 101 */ 102 public function xssFilter($value) 103 { 104 $filter = new CHtmlPurifier(); 105 $filter->options = array( 106 'AutoFormat.RemoveEmpty'=>false, 107 'CSS.AllowTricky'=>true, // Allow display:none; (and other) 108 'HTML.SafeObject'=>true, // To allow including youtube 109 'Output.FlashCompat'=>true, 110 'Attr.EnableID'=>true, // Allow to set id |
#6 |
+
–
/var/www/limesurvey/application/core/LSYii_Validators.php(52): LSYii_Validators->xssFilter("Jean MOULIN") 47 48 protected function validateAttribute($object,$attribute) 49 { 50 if($this->xssfilter) 51 { 52 $object->$attribute=$this->xssFilter($object->$attribute); 53 } 54 if($this->isUrl) 55 { 56 if ($object->$attribute== 'http://' || $object->$attribute=='https://') {$object->$attribute="";} 57 $object->$attribute=html_entity_decode($object->$attribute, ENT_QUOTES, "UTF-8"); // 140219 : Why not urlencode ? |
#7 |
+
–
/var/www/limesurvey/framework/validators/CValidator.php(213): LSYii_Validators->validateAttribute(Survey, "admin") 208 else 209 $attributes=$this->attributes; 210 foreach($attributes as $attribute) 211 { 212 if(!$this->skipOnError || !$object->hasErrors($attribute)) 213 $this->validateAttribute($object,$attribute); 214 } 215 } 216 217 /** 218 * Returns the JavaScript needed for performing client-side validation. |
#8 |
+
–
/var/www/limesurvey/framework/base/CModel.php(159): CValidator->validate(Survey, null) 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; |
#9 |
+
–
/var/www/limesurvey/framework/db/ar/CActiveRecord.php(805): CModel->validate(null) 800 * meaning all attributes that are loaded from DB will be saved. 801 * @return boolean whether the saving succeeds 802 */ 803 public function save($runValidation=true,$attributes=null) 804 { 805 if(!$runValidation || $this->validate($attributes)) 806 return $this->getIsNewRecord() ? $this->insert($attributes) : $this->update($attributes); 807 else 808 return false; 809 } 810 |
#10 |
+
–
/var/www/limesurvey/application/models/Survey.php(381): CActiveRecord->save() 376 while (!is_null($isresult)); 377 378 $survey = new self; 379 foreach ($aData as $k => $v) 380 $survey->$k = $v; 381 $sResult= $survey->save(); 382 if ($sResult==false) return false; 383 else return $aData['sid']; 384 } 385 386 /** |
#11 |
+
–
/var/www/limesurvey/application/controllers/admin/surveyadmin.php(1578): Survey->insertNewSurvey(array("expires" => "", "startdate" => "", "template" => "default", "owner_id" => 58, ...)) 1573 if (!is_null($iSurveyID)) 1574 { 1575 $aInsertData['wishSID'] = $iSurveyID; 1576 } 1577 1578 $iNewSurveyid = Survey::model()->insertNewSurvey($aInsertData); 1579 if (!$iNewSurveyid) 1580 die('Survey could not be created.'); 1581 1582 // Prepare locale data for surveys_language_settings table 1583 $sTitle = $_POST['surveyls_title']; |
#12 |
unknown(0): SurveyAdmin->insert(null)
|
#13 |
+
–
/var/www/limesurvey/framework/web/actions/CAction.php(108): ReflectionMethod->invokeArgs(SurveyAdmin, array(null)) 103 elseif($param->isDefaultValueAvailable()) 104 $ps[]=$param->getDefaultValue(); 105 else 106 return false; 107 } 108 $method->invokeArgs($object,$ps); 109 return true; 110 } 111 } |
#14 |
+
–
/var/www/limesurvey/application/core/Survey_Common_Action.php(99): CAction->runWithParamsInternal(SurveyAdmin, ReflectionMethod, array("sa" => "insert")) 094 $oMethod = new ReflectionMethod($this, $sDefault); 095 } 096 097 // We're all good to go, let's execute it 098 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params 099 return parent::runWithParamsInternal($this, $oMethod, $params); 100 } 101 102 /** 103 * Some functions have different parameters, which are just an alias of the 104 * usual parameters we're getting in the url. This function just populates |
#15 |
+
–
/var/www/limesurvey/framework/web/CController.php(308): Survey_Common_Action->runWithParams(array("sa" => "insert")) 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; |
#16 |
+
–
/var/www/limesurvey/framework/web/CController.php(286): CController->runAction(SurveyAdmin) 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(); |
#17 |
+
–
/var/www/limesurvey/framework/web/CController.php(265): CController->runActionWithFilters(SurveyAdmin, 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); |
#18 |
+
–
/var/www/limesurvey/application/controllers/AdminController.php(169): CController->run("survey") 164 $this->redirect(array('/admin/authentication/sa/login')); 165 } 166 167 } 168 169 return parent::run($action); 170 } 171 172 /** 173 * Routes all the actions to their respective places 174 * |
#19 |
+
–
/var/www/limesurvey/framework/web/CWebApplication.php(282): AdminController->run("survey") 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))); |
#20 |
+
–
/var/www/limesurvey/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/survey/sa/insert") 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. |
#21 |
+
–
/var/www/limesurvey/framework/base/CApplication.php(180): CWebApplication->processRequest() 175 public function run() 176 { 177 if($this->hasEventHandler('onBeginRequest')) 178 $this->onBeginRequest(new CEvent($this)); 179 register_shutdown_function(array($this,'end'),0,false); 180 $this->processRequest(); 181 if($this->hasEventHandler('onEndRequest')) 182 $this->onEndRequest(new CEvent($this)); 183 } 184 185 /** |
#22 |
+
–
/var/www/limesurvey/index.php(200): CApplication->run() 195 die (sprintf('%s should be writable by the webserver (755 or 775).', $runtimePath)); 196 } 197 } 198 199 200 Yii::createApplication('LSYii_Application', $config)->run(); 201 202 /* End of file index.php */ 203 /* Location: ./index.php */ |