fix: cross-verify update API claims against npm registry (#1082)
* fix: cross-verify update API claims against npm registry * Update packages/web/server/lib/package-manager.js Signed-off-by: Islam Nofl <islamnofl.official@gmail.com> * fix: show live server version in AboutDialog instead of stale build-time constant * fix: add comment to empty catch block to satisfy lint no-empty rule * fix: preserve live about dialog version in electron * fix: scope update checks by runtime --------- Signed-off-by: Islam Nofl <islamnofl.official@gmail.com> Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
committed by
GitHub
co-authored by
Bohdan Triapitsyn
parent
c924e85a29
commit
a23f5e7545
@@ -23,6 +23,9 @@ declare global {
|
||||
theme: string;
|
||||
connectionStatus: string;
|
||||
cliAvailable?: boolean;
|
||||
extensionVersion?: string;
|
||||
platform?: string;
|
||||
arch?: string;
|
||||
panelType?: PanelType;
|
||||
viewMode?: 'sidebar' | 'editor';
|
||||
initialSessionId?: string | null;
|
||||
@@ -919,8 +922,8 @@ const handleLocalApiRequest = async (url: URL, init?: RequestInit) => {
|
||||
const currentVersion = url.searchParams.get('currentVersion') || undefined;
|
||||
const instanceMode = url.searchParams.get('instanceMode') || 'local';
|
||||
const deviceClass = url.searchParams.get('deviceClass') || 'desktop';
|
||||
const platform = url.searchParams.get('platform') || undefined;
|
||||
const arch = url.searchParams.get('arch') || undefined;
|
||||
const platform = url.searchParams.get('platform') || window.__VSCODE_CONFIG__?.platform || undefined;
|
||||
const arch = url.searchParams.get('arch') || window.__VSCODE_CONFIG__?.arch || undefined;
|
||||
const reportUsageRaw = (url.searchParams.get('reportUsage') || 'true').toLowerCase();
|
||||
const reportUsage = !(reportUsageRaw === 'false' || reportUsageRaw === '0' || reportUsageRaw === 'no');
|
||||
const data = await sendBridgeMessage('api:openchamber:update-check', {
|
||||
|
||||
Reference in New Issue
Block a user