Skip to content

Commit

Permalink
fix eclipse-theia#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 authored and Sean Hellum committed Mar 12, 2020
1 parent ed6cffd commit 1b80dac
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 1b80dac

Please sign in to comment.