diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-04-27 16:17:21 +0200 |
---|---|---|
committer | Grégoire Aubert <gregaubert@users.noreply.github.com> | 2017-04-28 15:32:07 +0200 |
commit | 5d361e9ec5437d9402d95939b630796494416021 (patch) | |
tree | 23fb2533e30dca5aef84c14e91f069490d1cfd41 /server/sonar-web/src/main/js/apps/quality-gates | |
parent | 56194c84a561bfb8b446bf5d87c73f41e8822dab (diff) | |
download | sonarqube-5d361e9ec5437d9402d95939b630796494416021.tar.gz sonarqube-5d361e9ec5437d9402d95939b630796494416021.zip |
SONAR-9003 Fix Xss vulnerability
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-gates')
-rw-r--r-- | server/sonar-web/src/main/js/apps/quality-gates/views/gate-projects-view.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/gate-projects-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/gate-projects-view.js index fa9d4cc1aba..7366f2533aa 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/views/gate-projects-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/views/gate-projects-view.js @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import Marionette from 'backbone.marionette'; +import escapeHtml from 'escape-html'; import Template from '../templates/quality-gate-detail-projects.hbs'; import '../../../components/SelectList'; import { translate } from '../../../helpers/l10n'; @@ -33,8 +34,8 @@ export default Marionette.ItemView.extend({ width: '100%', readOnly: !this.options.edit, focusSearch: false, - format(item) { - return item.name; + dangerouslyUnescapedHtmlFormat(item) { + return escapeHtml(item.name); }, searchUrl: window.baseUrl + '/api/qualitygates/search?gateId=' + qualityGate.id, selectUrl: window.baseUrl + '/api/qualitygates/select', |