-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
disable, restart extension host, uninstall and remove problematic extension #242249
Conversation
await this.extensionManagementService.uninstallExtensions([{ | ||
extension: e.local, | ||
options: { | ||
remove: true, | ||
donotCheckDependents: true, | ||
context: { [EXTENSION_UNINSTALL_MALICIOUS_CONTEXT]: true } | ||
} | ||
}]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this takes an array of extensions to uninstall, why aren't we using a single call to this method, instead of N calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right. I overlooked it.
this.notificationService.prompt( | ||
Severity.Warning, | ||
nls.localize('malicious warning', "The extension '{0}' was found to be problematic and has been removed.", e.identifier.id), | ||
[], | ||
{ | ||
sticky: true, | ||
priority: NotificationPriority.URGENT | ||
} | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this means that if 2 malicious extensions are removed, the user will get 2 popups?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was same as before.
@@ -1011,9 +1013,11 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension | |||
|
|||
this.updatesCheckDelayer = new ThrottledDelayer<void>(ExtensionsWorkbenchService.UpdatesCheckInterval); | |||
this.autoUpdateDelayer = new ThrottledDelayer<void>(1000); | |||
this.maliciousExtensionsCheckDelayer = new ThrottledDelayer<void>(1000 * 60 * 5 /* every five minutes */); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You really just need a Delayer
here. Or a regular timeout, like before.
disable, restart extension host, uninstall and remove problematic extension