CC-4894: Need to filter output for potential XSS exploits

-fixed few areas
This commit is contained in:
Martin Konecny 2013-01-29 15:17:29 -05:00
parent 9d4e0d2dd1
commit b15c4569eb
9 changed files with 20 additions and 9 deletions

View file

@ -385,6 +385,15 @@ class LibraryController extends Zend_Controller_Action
//TODO move this to the datatables row callback.
foreach ($r["aaData"] as &$data) {
foreach ($data as $k => &$v) {
if ($k != "image" && $k != "checkbox") {
$v = htmlspecialchars($v);
}
}
//TODO: Replace the above foreach loop with the line below when ticket
//CC-4896 is completed.
//$data = array_map('htmlspecialchars', $data);
if ($data['ftype'] == 'audioclip') {
$file = Application_Model_StoredFile::Recall($data['id']);
$scid = $file->getSoundCloudId();