Procházet zdrojové kódy

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

Zhiguo Wu před 3 roky
rodič
revize
09c1c10860

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

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