mirror of
https://github.com/coder/code-server.git
synced 2025-07-24 01:48:22 +08:00
35 lines
2.1 KiB
Diff
35 lines
2.1 KiB
Diff
Disable signature verification.
|
|
|
|
Extension signature verification is now mandatory for all platforms and needs to be disabled.
|
|
|
|
Index: code-server/lib/vscode/src/vs/platform/extensionManagement/node/extensionManagementService.ts
|
|
===================================================================
|
|
--- code-server.orig/lib/vscode/src/vs/platform/extensionManagement/node/extensionManagementService.ts
|
|
+++ code-server/lib/vscode/src/vs/platform/extensionManagement/node/extensionManagementService.ts
|
|
@@ -34,6 +34,7 @@ import {
|
|
ExtensionSignatureVerificationCode,
|
|
computeSize,
|
|
IAllowedExtensionsService,
|
|
+ // @ts-expect-error no-unused-variable
|
|
VerifyExtensionSignatureConfigKey,
|
|
shouldRequireRepositorySignatureFor,
|
|
} from '../common/extensionManagement.js';
|
|
@@ -87,6 +88,7 @@ export class ExtensionManagementService
|
|
@IDownloadService private downloadService: IDownloadService,
|
|
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
|
@IFileService private readonly fileService: IFileService,
|
|
+ // @ts-expect-error no-unused-variable
|
|
@IConfigurationService private readonly configurationService: IConfigurationService,
|
|
@IExtensionGalleryManifestService protected readonly extensionGalleryManifestService: IExtensionGalleryManifestService,
|
|
@IProductService productService: IProductService,
|
|
@@ -339,8 +341,7 @@ export class ExtensionManagementService
|
|
|
|
private async downloadExtension(extension: IGalleryExtension, operation: InstallOperation, verifySignature: boolean, clientTargetPlatform?: TargetPlatform): Promise<{ readonly location: URI; readonly verificationStatus: ExtensionSignatureVerificationCode | undefined }> {
|
|
if (verifySignature) {
|
|
- const value = this.configurationService.getValue(VerifyExtensionSignatureConfigKey);
|
|
- verifySignature = isBoolean(value) ? value : true;
|
|
+ verifySignature = false;
|
|
}
|
|
const { location, verificationStatus } = await this.extensionsDownloader.download(extension, operation, verifySignature, clientTargetPlatform);
|
|
const shouldRequireSignature = shouldRequireRepositorySignatureFor(extension.private, await this.extensionGalleryManifestService.getExtensionGalleryManifest());
|