1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Merge pull request #149 from mabashian/7283-xss-schedules

Sanitize schedule titles
This commit is contained in:
Michael Abashian 2017-08-03 09:36:13 -04:00 committed by GitHub
commit 77f4e21e19

View File

@ -85,9 +85,9 @@ export default
},
views: {
'@': {
templateProvider: function(ScheduleList, generateList, ParentObject){
templateProvider: function(ScheduleList, generateList, ParentObject, $filter){
// include name of parent resource in listTitle
ScheduleList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>` + N_('SCHEDULES');
ScheduleList.listTitle = `${$filter('sanitize')(ParentObject.name)}<div class='List-titleLockup'></div>` + N_('SCHEDULES');
let html = generateList.build({
list: ScheduleList,
mode: 'edit'
@ -178,9 +178,9 @@ export default
},
views: {
'@': {
templateProvider: function(ScheduleList, generateList, ParentObject){
templateProvider: function(ScheduleList, generateList, ParentObject, $filter){
// include name of parent resource in listTitle
ScheduleList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>` + N_('SCHEDULES');
ScheduleList.listTitle = `${$filter('sanitize')(ParentObject.name)}<div class='List-titleLockup'></div>` + N_('SCHEDULES');
let html = generateList.build({
list: ScheduleList,
mode: 'edit'
@ -268,9 +268,9 @@ export default
},
views: {
'@': {
templateProvider: function(ScheduleList, generateList, ParentObject){
templateProvider: function(ScheduleList, generateList, ParentObject, $filter){
// include name of parent resource in listTitle
ScheduleList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>` + N_('SCHEDULES');
ScheduleList.listTitle = `${$filter('sanitize')(ParentObject.name)}<div class='List-titleLockup'></div>` + N_('SCHEDULES');
let html = generateList.build({
list: ScheduleList,
mode: 'edit'