Skip to content

Commit f6da239

Browse files
committed
Remove browsing for file icon themes for security issues
1 parent f0f375d commit f6da239

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/vs/workbench/contrib/themes/browser/themes.contribution.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class MarketplaceThemesPicker {
241241
class InstalledThemesPicker {
242242
constructor(
243243
private readonly installMessage: string,
244-
private readonly browseMessage: string,
244+
private readonly browseMessage: string | undefined,
245245
private readonly placeholderMessage: string,
246246
private readonly marketplaceTag: string,
247247
private readonly setTheme: (theme: IWorkbenchTheme | undefined, settingsTarget: ThemeSettingTarget) => Promise<any>,
@@ -257,7 +257,7 @@ class InstalledThemesPicker {
257257
public async openQuickPick(picks: QuickPickInput<ThemeItem>[], currentTheme: IWorkbenchTheme) {
258258
let marketplaceThemePicker: MarketplaceThemesPicker | undefined;
259259
if (this.extensionGalleryService.isEnabled()) {
260-
if (this.extensionResourceLoaderService.supportsExtensionGalleryResources) {
260+
if (this.extensionResourceLoaderService.supportsExtensionGalleryResources && this.browseMessage) {
261261
marketplaceThemePicker = this.instantiationService.createInstance(MarketplaceThemesPicker, this.getMarketplaceColorThemes.bind(this), this.marketplaceTag);
262262
picks = [...configurationEntries(this.browseMessage), ...picks];
263263
} else {
@@ -399,14 +399,13 @@ registerAction2(class extends Action2 {
399399
const themeService = accessor.get(IWorkbenchThemeService);
400400

401401
const installMessage = localize('installIconThemes', "Install Additional File Icon Themes...");
402-
const browseMessage = '$(plus) ' + localize('browseIconThemes', "Browse Additional File Icon Themes...");
403402
const placeholderMessage = localize('themes.selectIconTheme', "Select File Icon Theme (Up/Down Keys to Preview)");
404403
const marketplaceTag = 'tag:icon-theme';
405404
const setTheme = (theme: IWorkbenchTheme | undefined, settingsTarget: ThemeSettingTarget) => themeService.setFileIconTheme(theme as IWorkbenchFileIconTheme, settingsTarget);
406405
const getMarketplaceColorThemes = (publisher: string, name: string, version: string) => themeService.getMarketplaceFileIconThemes(publisher, name, version);
407406

408407
const instantiationService = accessor.get(IInstantiationService);
409-
const picker = instantiationService.createInstance(InstalledThemesPicker, installMessage, browseMessage, placeholderMessage, marketplaceTag, setTheme, getMarketplaceColorThemes);
408+
const picker = instantiationService.createInstance(InstalledThemesPicker, installMessage, undefined, placeholderMessage, marketplaceTag, setTheme, getMarketplaceColorThemes);
410409

411410
const picks: QuickPickInput<ThemeItem>[] = [
412411
{ type: 'separator', label: localize('fileIconThemeCategory', 'file icon themes') },

0 commit comments

Comments
 (0)