Skip to content

Commit 7e62878

Browse files
Update components/dashboard/src/service/service.tsx
Co-authored-by: Filip Troníček <[email protected]>
1 parent 8f6c215 commit 7e62878

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

components/dashboard/src/service/service.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,8 @@ export class IDEFrontendService implements IDEFrontendDashboardService.IServer {
193193
const desktopLink = new URL(url);
194194
// allow to redirect only for whitelisted trusted protocols
195195
// security: IDE-69
196-
redirect =
197-
desktopLink.protocol === "vscode:" ||
198-
desktopLink.protocol === "vscode-insiders:" ||
199-
desktopLink.protocol === "jetbrains-gateway:";
196+
const trustedProtocols = ["vscode:", "vscode-insiders:", "jetbrains-gateway:"];
197+
redirect = trustedProtocols.includes(desktopLink.protocol);
200198
} catch (e) {
201199
console.error("invalid desktop link:", e);
202200
}

0 commit comments

Comments
 (0)