mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
fixing xss bugs
This commit is contained in:
parent
4ac73743e5
commit
b127e7f276
@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
export default
|
||||
angular.module('Utilities', ['RestServices', 'Utilities'])
|
||||
angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter'])
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
@ -99,9 +99,10 @@ angular.module('Utilities', ['RestServices', 'Utilities'])
|
||||
* alert-info...). Pass an optional function(){}, if you want a specific action to occur when user
|
||||
* clicks 'OK' button. Set secondAlert to true, when a second dialog is needed.
|
||||
*/
|
||||
.factory('Alert', ['$rootScope', function ($rootScope) {
|
||||
.factory('Alert', ['$rootScope', '$filter', function ($rootScope, $filter) {
|
||||
return function (hdr, msg, cls, action, secondAlert, disableButtons, backdrop) {
|
||||
var scope = $rootScope.$new(), alertClass, local_backdrop;
|
||||
msg = $filter('sanitize')(msg);
|
||||
if (secondAlert) {
|
||||
|
||||
$('#alertHeader2').html(hdr);
|
||||
|
@ -27,16 +27,16 @@
|
||||
*/
|
||||
|
||||
export default
|
||||
angular.module('PromptDialog', ['Utilities'])
|
||||
.factory('Prompt', ['$sce',
|
||||
function ($sce) {
|
||||
angular.module('PromptDialog', ['Utilities', 'sanitizeFilter'])
|
||||
.factory('Prompt', ['$sce', '$filter',
|
||||
function ($sce, $filter) {
|
||||
return function (params) {
|
||||
|
||||
var dialog = angular.element(document.getElementById('prompt-modal')),
|
||||
scope = dialog.scope(), cls, local_backdrop;
|
||||
|
||||
scope.promptHeader = params.hdr;
|
||||
scope.promptBody = $sce.trustAsHtml(params.body);
|
||||
scope.promptBody = $filter('sanitize')(params.body);
|
||||
scope.promptAction = params.action;
|
||||
|
||||
local_backdrop = (params.backdrop === undefined) ? "static" : params.backdrop;
|
||||
|
Loading…
Reference in New Issue
Block a user