Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent xss #2620

Merged
merged 8 commits into from
Jun 28, 2020
6 changes: 3 additions & 3 deletions webapp/content/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -3015,8 +3015,8 @@ function setDashboardName(name) {

document.title = name + ' - Graphite Dashboard';
changeHash(name);
navBar.setTitle(name + ' - (' + dashboardURL + ')');
saveButton.setText('Save "' + name + '"');
navBar.setTitle(htmlEncode(name + ' - (' + dashboardURL + ')'));
saveButton.setText(htmlEncode('Save "' + name + '"'));
saveButton.enable();
}
}
Expand Down Expand Up @@ -3153,7 +3153,7 @@ function showDashboardFinder() {

dashboardsList = new Ext.list.ListView({
columns: [
{header: 'Dashboard', width: 1.0, dataIndex: 'name', sortable: false}
{header: 'Dashboard', width: 1.0, dataIndex: 'name', sortable: false, tpl:'{name:htmlEncode}'}
],
columnSort: false,
emptyText: 'No dashboards found',
Expand Down