diff --git a/application/controllers/admin/responses.php b/application/controllers/admin/responses.php index 9710065a200..483e166f06f 100644 --- a/application/controllers/admin/responses.php +++ b/application/controllers/admin/responses.php @@ -756,8 +756,8 @@ public function getResponses_json($iSurveyID) { if (isset($aFilesInfo[$iFileIndex])) { - $aSurveyEntry[] = $aFilesInfo[$iFileIndex]['title']; - $aSurveyEntry[] = $aFilesInfo[$iFileIndex]['comment']; + $aSurveyEntry[] = htmlspecialchars($aFilesInfo[$iFileIndex]['title'],ENT_QUOTES, 'UTF-8'); + $aSurveyEntry[] = htmlspecialchars($aFilesInfo[$iFileIndex]['comment'],ENT_QUOTES, 'UTF-8'); $aSurveyEntry[] = CHtml::link(rawurldecode($aFilesInfo[$iFileIndex]['name']), $this->getController()->createUrl("/admin/responses",array("sa"=>"actionDownloadfile","surveyid"=>$surveyid,"iResponseId"=>$row['id'],"sFileName"=>$aFilesInfo[$iFileIndex]['name'])) ); $aSurveyEntry[] = sprintf('%s Mb',round($aFilesInfo[$iFileIndex]['size']/1000,2)); } diff --git a/application/core/LSYii_Validators.php b/application/core/LSYii_Validators.php index a8bf8dc3547..42de01106cb 100644 --- a/application/core/LSYii_Validators.php +++ b/application/core/LSYii_Validators.php @@ -42,7 +42,7 @@ class LSYii_Validators extends CValidator { public function __construct() { - if(Yii::app()->getConfig('DBVersion')< 172) // Permssion::model exist only after 172 DB version + if(Yii::app()->getConfig('DBVersion')< 172) // Permission::model exist only after 172 DB version return $this->xssfilter=($this->xssfilter && Yii::app()->getConfig('filterxsshtml')); $this->xssfilter=($this->xssfilter && Yii::app()->getConfig('filterxsshtml') && !Permission::model()->hasGlobalPermission('superadmin','read')); } @@ -52,6 +52,10 @@ protected function validateAttribute($object,$attribute) if($this->xssfilter) { $object->$attribute=$this->xssFilter($object->$attribute); + if($this->isUrl) + { + $object->$attribute=str_replace('javascript:','',html_entity_decode($object->$attribute, ENT_QUOTES, "UTF-8")); + } } if($this->isUrl) { diff --git a/application/helpers/frontend_helper.php b/application/helpers/frontend_helper.php index 4239466be28..774a19eef0e 100644 --- a/application/helpers/frontend_helper.php +++ b/application/helpers/frontend_helper.php @@ -888,10 +888,10 @@ function buildsurveysession($surveyid,$preview=false) && isset($_GET['loadname']) && isset($_GET['loadpass'])) { echo " - + - - "; + + "; } echo " @@ -972,10 +972,10 @@ function buildsurveysession($surveyid,$preview=false) && isset($_GET['loadname']) && isset($_GET['loadpass'])) { echo " - + - - "; + + "; } echo ""; @@ -1114,10 +1114,10 @@ function buildsurveysession($surveyid,$preview=false) if (isset($_GET['loadall']) && isset($_GET['scid']) && isset($_GET['loadname']) && isset($_GET['loadpass'])) { - echo " + echo " - - "; + + "; } echo '"; @@ -1133,10 +1133,10 @@ function buildsurveysession($surveyid,$preview=false) if (isset($_GET['loadall']) && isset($_GET['scid']) && isset($_GET['loadname']) && isset($_GET['loadpass'])) { - echo " + echo " - - "; + + "; } echo '$gettoken" .""; diff --git a/application/views/admin/usergroup/editUserGroup_view.php b/application/views/admin/usergroup/editUserGroup_view.php index c23d4581f73..987d6b0e8b4 100644 --- a/application/views/admin/usergroup/editUserGroup_view.php +++ b/application/views/admin/usergroup/editUserGroup_view.php @@ -2,9 +2,9 @@ 'form30', 'id'=>'usergroupform', 'name'=>'usergroupform')); ?>