Compare commits

...

3 Commits

Author SHA1 Message Date
chriswang521 afe5aedfef fixed:解决security patch for high severity CVEs(6da39206214579d35f63a16ef571f4adb49c4b42)的编译错误. 2023-12-11 14:34:05 +08:00
chriswang521 08cd478fed 0.1.3 -> 0.2.0 2023-12-11 14:34:05 +08:00
chriswang521 0fc07841bc docs: 修改READEM.md中nodejs版本. 2023-12-11 14:34:05 +08:00
8 changed files with 12 additions and 11 deletions

View File

@ -114,7 +114,7 @@
2. 安装指定版本nodejs
版本要求:>=16.14.x and <17
版本要求:>=18.15.x and <19
获取地址https://nodejs.org/dist/

View File

@ -1,6 +1,6 @@
{
"name": "kylin-code-dev",
"IDEVersion": "0.1.3",
"IDEVersion": "0.2.0",
"version": "1.68.0",
"distro": "2966cd72fc1a3a5fb89bf2d85a1a66e56206961a",
"author": {

View File

@ -163,7 +163,7 @@ export class OpenerService implements IOpenerService {
// validate against the original URI that this URI resolves to, if one exists
const validationTarget = this._resolvedUriTargets.get(targetURI) ?? target;
for (const validator of this._validators) {
if (!(await validator.shouldOpen(validationTarget))) {
if (!(await validator.shouldOpen(validationTarget, options))) {
return false;
}
}

View File

@ -246,7 +246,7 @@ export class LinkDetector extends Disposable implements IEditorContribution {
}
}
return this.openerService.open(uri, { openToSide, fromUserGesture, allowContributedOpeners: true, allowCommands: true });
return this.openerService.open(uri, { openToSide, fromUserGesture, allowContributedOpeners: true, allowCommands: true, fromWorkspace: true });
}, err => {
const messageOrError =

View File

@ -41,6 +41,7 @@ export type OpenExternalOptions = {
readonly openExternal?: boolean;
readonly allowTunneling?: boolean;
readonly allowContributedOpeners?: boolean | string;
readonly fromWorkspace?: boolean;
};
export type OpenOptions = OpenInternalOptions & OpenExternalOptions;
@ -61,7 +62,7 @@ export interface IExternalOpener {
}
export interface IValidator {
shouldOpen(resource: URI | string): Promise<boolean>;
shouldOpen(resource: URI | string, openOptions?: OpenOptions): Promise<boolean>;
}
export interface IExternalUriResolver {

View File

@ -89,7 +89,7 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
private onDidClickLink(handle: extHostProtocol.WebviewHandle, link: string): void {
const webview = this.getWebview(handle);
if (this.isSupportedLink(webview, URI.parse(link))) {
this._openerService.open(link, { fromUserGesture: true, allowContributedOpeners: true, allowCommands: true });
this._openerService.open(link, { fromUserGesture: true, allowContributedOpeners: true, allowCommands: true, fromWorkspace: true });
}
}

View File

@ -713,7 +713,7 @@ var requirejs = (function() {
}
if (linkToOpen) {
this.openerService.open(linkToOpen, { fromUserGesture: true, allowCommands: false });
this.openerService.open(linkToOpen, { fromUserGesture: true, allowCommands: false, fromWorkspace: true });
}
break;
}

View File

@ -8,7 +8,7 @@ import Severity from 'vs/base/common/severity';
import { URI } from 'vs/base/common/uri';
import { localize } from 'vs/nls';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { IOpenerService, matchesScheme } from 'vs/platform/opener/common/opener';
import { IOpenerService, matchesScheme, OpenOptions } from 'vs/platform/opener/common/opener';
import { IProductService } from 'vs/platform/product/common/productService';
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
import { IStorageService } from 'vs/platform/storage/common/storage';
@ -45,7 +45,7 @@ export class OpenerValidatorContributions implements IWorkbenchContribution {
@IConfigurationService private readonly _configurationService: IConfigurationService,
@IWorkspaceTrustManagementService private readonly _workspaceTrustService: IWorkspaceTrustManagementService,
) {
this._openerService.registerValidator({ shouldOpen: r => this.validateLink(r) });
this._openerService.registerValidator({ shouldOpen: (uri, options) => this.validateLink(uri, options) });
this._readAuthenticationTrustedDomainsResult = new IdleValue(() =>
this._instantiationService.invokeFunction(readAuthenticationTrustedDomains));
@ -64,12 +64,12 @@ export class OpenerValidatorContributions implements IWorkbenchContribution {
});
}
async validateLink(resource: URI | string): Promise<boolean> {
async validateLink(resource: URI | string, openOptions?: OpenOptions): Promise<boolean> {
if (!matchesScheme(resource, Schemas.http) && !matchesScheme(resource, Schemas.https)) {
return true;
}
if (this._workspaceTrustService.isWorkspaceTrusted() && !this._configurationService.getValue('workbench.trustedDomains.promptInTrustedWorkspace')) {
if (openOptions?.fromWorkspace && this._workspaceTrustService.isWorkspaceTrusted() && !this._configurationService.getValue('workbench.trustedDomains.promptInTrustedWorkspace')) {
return true;
}