Browse Source

AMBARI-25387: Ambari-Web UI hosts Tab is vulnerable to XSS attack (#3491)

Zhiguo Wu 3 years ago
parent
commit
09c1c10860
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ambari-web/app/views/common/helpers/format_word_break_view.js

+ 1 - 1
ambari-web/app/views/common/helpers/format_word_break_view.js

@@ -38,7 +38,7 @@ App.FormatWordBreakView = Em.View.extend({
    * @type {string}
    * @type {string}
    */
    */
   result: function() {
   result: function() {
-    var content = this.get('content') || '';
+    var content = Ember.Handlebars.Utils.escapeExpression(this.get('content')) || '';
     var self = this;
     var self = this;
     ['.', '_', '/'].forEach(function (delimiter) {
     ['.', '_', '/'].forEach(function (delimiter) {
       if (content.contains(delimiter)) {
       if (content.contains(delimiter)) {