Merge branch '2.3.x' of dev.sourcefabric.org:airtime into 2.3.x
This commit is contained in:
commit
f2773fcb01
72 changed files with 8418 additions and 13592 deletions
|
@ -262,7 +262,14 @@ class ApiController extends Zend_Controller_Action
|
|||
"currentShow"=>Application_Model_Show::getCurrentShow($utcTimeNow),
|
||||
"nextShow"=>Application_Model_Show::getNextShows($utcTimeNow, $limit, $utcTimeEnd)
|
||||
);
|
||||
|
||||
// XSS exploit prevention
|
||||
foreach ($result["currentShow"] as &$current) {
|
||||
$current["name"] = htmlspecialchars($current["name"]);
|
||||
}
|
||||
foreach ($result["nextShow"] as &$next) {
|
||||
$next["name"] = htmlspecialchars($next["name"]);
|
||||
}
|
||||
|
||||
Application_Model_Show::convertToLocalTimeZone($result["currentShow"],
|
||||
array("starts", "ends", "start_timestamp", "end_timestamp"));
|
||||
Application_Model_Show::convertToLocalTimeZone($result["nextShow"],
|
||||
|
@ -270,6 +277,17 @@ class ApiController extends Zend_Controller_Action
|
|||
} else {
|
||||
$result = Application_Model_Schedule::GetPlayOrderRange();
|
||||
|
||||
// XSS exploit prevention
|
||||
$result["previous"]["name"] = htmlspecialchars($result["previous"]["name"]);
|
||||
$result["current"]["name"] = htmlspecialchars($result["current"]["name"]);
|
||||
$result["next"]["name"] = htmlspecialchars($result["next"]["name"]);
|
||||
foreach ($result["currentShow"] as &$current) {
|
||||
$current["name"] = htmlspecialchars($current["name"]);
|
||||
}
|
||||
foreach ($result["nextShow"] as &$next) {
|
||||
$next["name"] = htmlspecialchars($next["name"]);
|
||||
}
|
||||
|
||||
//Convert from UTC to localtime for Web Browser.
|
||||
Application_Model_Show::ConvertToLocalTimeZone($result["currentShow"],
|
||||
array("starts", "ends", "start_timestamp", "end_timestamp"));
|
||||
|
@ -316,7 +334,15 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
$result[$dow[$i]] = $shows;
|
||||
}
|
||||
|
||||
|
||||
// XSS exploit prevention
|
||||
foreach ($dow as $d) {
|
||||
foreach ($result[$d] as &$show) {
|
||||
$show["name"] = htmlspecialchars($show["name"]);
|
||||
$show["url"] = htmlspecialchars($show["url"]);
|
||||
}
|
||||
}
|
||||
|
||||
//used by caller to determine if the airtime they are running or widgets in use is out of date.
|
||||
$result['AIRTIME_API_VERSION'] = AIRTIME_API_VERSION;
|
||||
header("Content-type: text/javascript");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue