mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-06-29 01:27:22 +01:00
Security hardening for Try Cosmos DB connection string flow (#2500)
* Security hardening for Try Cosmos DB connection string flow - Validate connection string format via parseConnectionString before accepting postMessage - Restrict localhost:12900 in allowedHostedExplorerEndpoints to development builds only - Export App component for testability with null-check on render target - Add 12 unit tests covering origin validation, format validation, and message handling * Fix HostedExplorer test mock types for compile --------- Co-authored-by: Asier Isayas <aisayas@microsoft.com>
This commit is contained in:
@@ -85,7 +85,7 @@ export const allowedArcadiaEndpoints: ReadonlyArray<string> = ["https://workspac
|
||||
|
||||
export const allowedHostedExplorerEndpoints: ReadonlyArray<string> = [
|
||||
"https://cosmos.azure.com",
|
||||
"https://localhost:12900",
|
||||
...(process.env.NODE_ENV === "development" ? ["https://localhost:12900"] : []),
|
||||
];
|
||||
|
||||
export const allowedMsalRedirectEndpoints: ReadonlyArray<string> = ["https://dataexplorer-preview.azurewebsites.net/"];
|
||||
|
||||
Reference in New Issue
Block a user