Skip to content

Commit

Permalink
fix #6987 XSS vulnerability in browser sidebar
Browse files Browse the repository at this point in the history
Change simply updates innerHtml to innerText to ensure user supplied
content does not impact the dom.

Signed-off-by: Casey Flynn <caseyflynn@google.com>
  • Loading branch information
caseyflynn-google committed Jan 29, 2020
1 parent 791b576 commit a6d565e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/browser/shell/side-panel-toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class SidePanelToolbar extends BaseWidget {
set toolbarTitle(title: Title<Widget> | undefined) {
if (this.titleContainer && title) {
this._toolbarTitle = title;
this.titleContainer.innerHTML = this._toolbarTitle.label;
this.titleContainer.innerText = this._toolbarTitle.label;
this.titleContainer.title = this._toolbarTitle.caption || this._toolbarTitle.label;
this.update();
}
Expand Down

0 comments on commit a6d565e

Please sign in to comment.