Skip to content

Commit

Permalink
Fixed issue #07087: XSS security in statistics for admin
Browse files Browse the repository at this point in the history
Dev: review #07085 : using included sanitize_helper function.
 Dev: maybe move sanitize_helper to Yii CFormatter http://www.yiiframework.com/doc/api/1.1/CFormatter
  • Loading branch information
Shnoulle committed Dec 15, 2012
1 parent 038433c commit ea2246a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion application/controllers/PrintanswersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function actionView($surveyid, $printablexport='')
}
else
{
$sPrintOutput .= "\t<tr class='printanswersquestion'><td>{$fname[0]} {$fname[1]}</td><td class='printanswersanswertext'>".htmlspecialchars($fname[2])."</td></tr>";
$sPrintOutput .= "\t<tr class='printanswersquestion'><td>{$fname[0]} {$fname[1]}</td><td class='printanswersanswertext'>".sanitize_html_string($fname[2])."</td></tr>";
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/export/statistics_browse_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
</a>
</div>
<div class='statisticscolumndata'>
<?php echo stripslashes($row['value']) ?>
<?php echo sanitize_html_string($row['value']) ?>
</div>
<div style='clear: both'></div>
<?php
}
?>
?>

0 comments on commit ea2246a

Please sign in to comment.