Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c60a0c9d56 | ||
|
|
05b2dce394 | ||
|
|
390518be0f | ||
|
|
e07bc60672 | ||
|
|
d75618f9aa | ||
|
|
aa34e1c49d | ||
|
|
2f618ce2cf | ||
|
|
085f4aa90c | ||
|
|
c1ddb91268 | ||
|
|
b3bc62ad8e | ||
|
|
32a4df4952 |
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
name: Claude Code Review
|
name: Claude Code Review
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request:
|
||||||
types: [opened, synchronize, ready_for_review, reopened]
|
types: [opened, synchronize, ready_for_review, reopened]
|
||||||
# Optional: Only run on specific file changes
|
# Optional: Only run on specific file changes
|
||||||
# paths:
|
# paths:
|
||||||
|
|||||||
@@ -46,5 +46,5 @@ jobs:
|
|||||||
# Optional: Add claude_args to customize behavior and configuration
|
# Optional: Add claude_args to customize behavior and configuration
|
||||||
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
||||||
# or https://code.claude.com/docs/en/cli-reference for available options
|
# or https://code.claude.com/docs/en/cli-reference for available options
|
||||||
# claude_args: '--allowed-tools Bash(gh pr:*)'
|
# claude_args: '--allowed-tools Bash(gh pr *)'
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
docker run --rm -v nmn55t4io3myfubs72worn7k_wwv-data:/data nouchka/sqlite3 /data/wwv.db "UPDATE InstalledPlugin SET config = json_set(config, '$.format', 'static', '$.dataFile', 'https://cdn.jsdelivr.net/npm/@worldwideview/[email protected]/data/military-bases.geojson') WHERE pluginId = 'military-bases';"
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "worldwideview",
|
"name": "worldwideview",
|
||||||
"version": "1.12.0",
|
"version": "1.13.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"setup": "node scripts/setup.mjs",
|
"setup": "node scripts/setup.mjs",
|
||||||
|
|||||||
+1
-1
@@ -227,5 +227,5 @@ export type DataBusEvents = {
|
|||||||
};
|
};
|
||||||
globeReady: Record<string, never>;
|
globeReady: Record<string, never>;
|
||||||
};
|
};
|
||||||
export * from "./viteGlobals.js";
|
export * from "./viteGlobals";
|
||||||
//# sourceMappingURL=index.d.ts.map
|
//# sourceMappingURL=index.d.ts.map
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAKpC,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3D,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC5B,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,EACxB,IAAI,GAAE,cAAmB,GAC1B,MAAM,CA4BR;AAGD,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGzJ,MAAM,MAAM,cAAc,GACpB,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,kBAAkB,GAClB,gBAAgB,GAChB,OAAO,GACP,OAAO,GACP,UAAU,GACV,cAAc,GACd,QAAQ,CAAC;AAGf,MAAM,WAAW,SAAS;IACtB,KAAK,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IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChE,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAGhB,UAAU,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,OAAO,IAAI,IAAI,CAAC;IAGhB,KAAK,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IAClD,kBAAkB,IAAI,MAAM,CAAC;IAG7B,cAAc,IAAI,WAAW,CAAC;IAC9B,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,mBAAmB,CAAC;IAGrD,oBAAoB,CAAC,CAAC,MAAM,EAAE,SAAS,GAAG,iBAAiB,GAAG,IAAI,CAAC;IACnE,eAAe,CAAC,IAAI,kBAAkB,CAAC;IACvC,oBAAoB,CAAC,IAAI,gBAAgB,EAAE,CAAC;IAC5C,SAAS,CAAC,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1F,mBAAmB,CAAC,IAAI,aAAa,CAAC;QAAE,MAAM,CAAC,EAAE,GAAG,CAAA;KAAE,Line truncated
|
||||||
+1
-1
@@ -42,4 +42,4 @@ export function createSvgIconUrl(Icon, opts = {}) {
|
|||||||
].join("");
|
].join("");
|
||||||
return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(wrappedSvg)}`;
|
return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(wrappedSvg)}`;
|
||||||
}
|
}
|
||||||
export * from "./viteGlobals.js";
|
export * from "./viteGlobals";
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
UPDATE installed_plugins SET config = json_set(config, '$.format', 'static', '$.dataFile', 'https://cdn.jsdelivr.net/npm/@worldwideview/[email protected]/data/military-bases.geojson') WHERE pluginId = 'military-bases';
|
||||||
@@ -24,7 +24,7 @@ export async function GET() {
|
|||||||
return NextResponse.json({ cameras: cache.data, cached: true, stale: true });
|
return NextResponse.json({ cameras: cache.data, cached: true, stale: true });
|
||||||
}
|
}
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ error: "Failed to fetch GDOT cameras", details: error.message },
|
{ error: "Failed to fetch GDOT cameras" },
|
||||||
{ status: 502 },
|
{ status: 502 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,14 @@ import { isAuthEnabled } from "@/core/edition";
|
|||||||
import { cameraProxyLimiter } from "@/lib/rateLimiters";
|
import { cameraProxyLimiter } from "@/lib/rateLimiters";
|
||||||
import { getClientIp } from "@/lib/rateLimit";
|
import { getClientIp } from "@/lib/rateLimit";
|
||||||
|
|
||||||
|
import dns from "dns/promises";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Block requests to private/internal networks to prevent SSRF attacks.
|
* Block requests to private/internal networks to prevent SSRF attacks.
|
||||||
|
* Resolves the domain to an IP address first to prevent basic DNS rebinding.
|
||||||
* Allows any external URL (needed for user-configured custom camera sources).
|
* Allows any external URL (needed for user-configured custom camera sources).
|
||||||
*/
|
*/
|
||||||
function isPrivateUrl(urlStr: string): boolean {
|
async function isPrivateUrl(urlStr: string): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
const parsed = new URL(urlStr);
|
const parsed = new URL(urlStr);
|
||||||
const host = parsed.hostname;
|
const host = parsed.hostname;
|
||||||
@@ -19,21 +22,36 @@ function isPrivateUrl(urlStr: string): boolean {
|
|||||||
// If developer overrides local restrictions, bypass checks
|
// If developer overrides local restrictions, bypass checks
|
||||||
if (process.env.WWV_PROXY_ALLOW_LOCAL === "true") return false;
|
if (process.env.WWV_PROXY_ALLOW_LOCAL === "true") return false;
|
||||||
|
|
||||||
// Block localhost variants
|
// Block localhost variants upfront
|
||||||
if (host === "localhost" || host === "127.0.0.1" || host === "::1") return true;
|
if (host === "localhost" || host === "127.0.0.1" || host === "::1") return true;
|
||||||
|
|
||||||
// Block private IPv4 ranges
|
// Block cloud metadata endpoints explicitly
|
||||||
const parts = host.split(".").map(Number);
|
if (host === "metadata.google.internal") return true;
|
||||||
|
|
||||||
|
// Resolve the host to its IP address to prevent DNS rebinding
|
||||||
|
let resolvedIp: string;
|
||||||
|
try {
|
||||||
|
const lookupResult = await dns.lookup(host);
|
||||||
|
resolvedIp = lookupResult.address;
|
||||||
|
} catch {
|
||||||
|
return true; // DNS resolution failed
|
||||||
|
}
|
||||||
|
|
||||||
|
// Block private IPv4 ranges using resolved IP
|
||||||
|
const parts = resolvedIp.split(".").map(Number);
|
||||||
if (parts.length === 4 && parts.every((n) => !isNaN(n))) {
|
if (parts.length === 4 && parts.every((n) => !isNaN(n))) {
|
||||||
if (parts[0] === 10) return true; // 10.0.0.0/8
|
if (parts[0] === 10) return true; // 10.0.0.0/8
|
||||||
if (parts[0] === 172 && parts[1] >= 16 && parts[1] <= 31) return true; // 172.16.0.0/12
|
if (parts[0] === 172 && parts[1] >= 16 && parts[1] <= 31) return true; // 172.16.0.0/12
|
||||||
if (parts[0] === 192 && parts[1] === 168) return true; // 192.168.0.0/16
|
if (parts[0] === 192 && parts[1] === 168) return true; // 192.168.0.0/16
|
||||||
if (parts[0] === 169 && parts[1] === 254) return true; // link-local
|
if (parts[0] === 169 && parts[1] === 254) return true; // link-local
|
||||||
if (parts[0] === 0) return true; // 0.0.0.0/8
|
if (parts[0] === 0) return true; // 0.0.0.0/8
|
||||||
|
if (parts[0] === 127) return true; // 127.0.0.0/8
|
||||||
|
}
|
||||||
|
|
||||||
|
// Block simple IPv6 private/local ranges
|
||||||
|
if (resolvedIp === "::1" || resolvedIp.startsWith("fe80:") || resolvedIp.startsWith("fc") || resolvedIp.startsWith("fd")) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Block cloud metadata endpoints
|
|
||||||
if (host === "metadata.google.internal") return true;
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} catch {
|
} catch {
|
||||||
@@ -60,7 +78,7 @@ export async function GET(req: NextRequest) {
|
|||||||
return NextResponse.json({ error: "Missing 'url' parameter" }, { status: 400 });
|
return NextResponse.json({ error: "Missing 'url' parameter" }, { status: 400 });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isPrivateUrl(targetUrl)) {
|
if (await isPrivateUrl(targetUrl)) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ error: "Requests to private/internal networks are not allowed" },
|
{ error: "Requests to private/internal networks are not allowed" },
|
||||||
{ status: 403 },
|
{ status: 403 },
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ import { getClientIp } from "@/lib/rateLimit";
|
|||||||
const BLOCKED_HOSTS = ["localhost", "127.0.0.1", "::1", "metadata.google.internal"];
|
const BLOCKED_HOSTS = ["localhost", "127.0.0.1", "::1", "metadata.google.internal"];
|
||||||
const MAX_STREAM_DURATION_MS = 5 * 60 * 1000; // 5 minutes
|
const MAX_STREAM_DURATION_MS = 5 * 60 * 1000; // 5 minutes
|
||||||
|
|
||||||
function isPrivateUrl(urlStr: string): boolean {
|
import dns from "dns/promises";
|
||||||
|
|
||||||
|
async function isPrivateUrl(urlStr: string): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
const parsed = new URL(urlStr);
|
const parsed = new URL(urlStr);
|
||||||
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return true;
|
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return true;
|
||||||
@@ -18,14 +20,28 @@ function isPrivateUrl(urlStr: string): boolean {
|
|||||||
|
|
||||||
if (BLOCKED_HOSTS.includes(host)) return true;
|
if (BLOCKED_HOSTS.includes(host)) return true;
|
||||||
|
|
||||||
const parts = host.split(".").map(Number);
|
let resolvedIp: string;
|
||||||
|
try {
|
||||||
|
const lookupResult = await dns.lookup(host);
|
||||||
|
resolvedIp = lookupResult.address;
|
||||||
|
} catch {
|
||||||
|
return true; // DNS resolution failed
|
||||||
|
}
|
||||||
|
|
||||||
|
const parts = resolvedIp.split(".").map(Number);
|
||||||
if (parts.length === 4 && parts.every((n) => !isNaN(n))) {
|
if (parts.length === 4 && parts.every((n) => !isNaN(n))) {
|
||||||
if (parts[0] === 10) return true;
|
if (parts[0] === 10) return true;
|
||||||
if (parts[0] === 172 && parts[1] >= 16 && parts[1] <= 31) return true;
|
if (parts[0] === 172 && parts[1] >= 16 && parts[1] <= 31) return true;
|
||||||
if (parts[0] === 192 && parts[1] === 168) return true;
|
if (parts[0] === 192 && parts[1] === 168) return true;
|
||||||
if (parts[0] === 169 && parts[1] === 254) return true;
|
if (parts[0] === 169 && parts[1] === 254) return true;
|
||||||
if (parts[0] === 0) return true;
|
if (parts[0] === 0) return true;
|
||||||
|
if (parts[0] === 127) return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (resolvedIp === "::1" || resolvedIp.startsWith("fe80:") || resolvedIp.startsWith("fc") || resolvedIp.startsWith("fd")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} catch {
|
} catch {
|
||||||
return true;
|
return true;
|
||||||
@@ -52,7 +68,7 @@ export async function GET(req: NextRequest) {
|
|||||||
return NextResponse.json({ error: "Missing 'url' parameter" }, { status: 400 });
|
return NextResponse.json({ error: "Missing 'url' parameter" }, { status: 400 });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isPrivateUrl(targetUrl)) {
|
if (await isPrivateUrl(targetUrl)) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ error: "Requests to private/internal networks are not allowed" },
|
{ error: "Requests to private/internal networks are not allowed" },
|
||||||
{ status: 403 },
|
{ status: 403 },
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export async function GET() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ error: "Failed to fetch traffic cameras", details: error.message },
|
{ error: "Failed to fetch traffic cameras" },
|
||||||
{ status: 502 },
|
{ status: 502 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { auth } from "@/lib/auth";
|
|||||||
import { issueMarketplaceToken } from "@/lib/marketplace/marketplaceToken";
|
import { issueMarketplaceToken } from "@/lib/marketplace/marketplaceToken";
|
||||||
import { grantTokenLimiter } from "@/lib/rateLimiters";
|
import { grantTokenLimiter } from "@/lib/rateLimiters";
|
||||||
import { getClientIp } from "@/lib/rateLimit";
|
import { getClientIp } from "@/lib/rateLimit";
|
||||||
import { isPluginInstallEnabled } from "@/core/edition";
|
import { isPluginInstallEnabled, isDemo, isDemoAdmin } from "@/core/edition";
|
||||||
|
|
||||||
const ALLOWED_REDIRECT_HOSTS = new Set([
|
const ALLOWED_REDIRECT_HOSTS = new Set([
|
||||||
"localhost",
|
"localhost",
|
||||||
@@ -50,16 +50,20 @@ export async function GET(request: NextRequest) {
|
|||||||
const session = await auth();
|
const session = await auth();
|
||||||
|
|
||||||
if (!session?.user) {
|
if (!session?.user) {
|
||||||
// Use forwarded host or Host header for correct public URL behind reverse proxy
|
// Use configured app URL to prevent Host header injection open redirects
|
||||||
const host = request.headers.get("x-forwarded-host") ?? request.headers.get("host") ?? request.nextUrl.host;
|
const origin = process.env.NEXT_PUBLIC_APP_URL || process.env.APP_URL || request.nextUrl.origin;
|
||||||
const proto = request.headers.get("x-forwarded-proto") ?? (request.nextUrl.protocol.replace(":", ""));
|
|
||||||
const origin = `${proto}://${host}`;
|
|
||||||
const loginUrl = new URL("/login", origin);
|
const loginUrl = new URL("/login", origin);
|
||||||
const callbackUrl = request.nextUrl.pathname + request.nextUrl.search;
|
|
||||||
loginUrl.searchParams.set("callbackUrl", `${origin}${callbackUrl}`);
|
// Construct a relative path for callback to ensure it redirects back to the identical host
|
||||||
|
const callbackPath = request.nextUrl.pathname + request.nextUrl.search;
|
||||||
|
loginUrl.searchParams.set("callbackUrl", callbackPath);
|
||||||
return NextResponse.redirect(loginUrl);
|
return NextResponse.redirect(loginUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isDemo && !isDemoAdmin(session)) {
|
||||||
|
return NextResponse.json({ error: "Admin access required on Demo edition" }, { status: 403 });
|
||||||
|
}
|
||||||
|
|
||||||
if (!redirectTo || !isSafeRedirect(redirectTo)) {
|
if (!redirectTo || !isSafeRedirect(redirectTo)) {
|
||||||
return NextResponse.json({ error: "Invalid or missing redirectTo" }, { status: 400 });
|
return NextResponse.json({ error: "Invalid or missing redirectTo" }, { status: 400 });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type { PluginManifest } from "@/core/plugins/PluginManifest";
|
|||||||
import { validateManifest } from "@/core/plugins/validateManifest";
|
import { validateManifest } from "@/core/plugins/validateManifest";
|
||||||
import { installLimiter } from "@/lib/rateLimiters";
|
import { installLimiter } from "@/lib/rateLimiters";
|
||||||
import { getClientIp } from "@/lib/rateLimit";
|
import { getClientIp } from "@/lib/rateLimit";
|
||||||
import { isPluginInstallEnabled } from "@/core/edition";
|
import { isPluginInstallEnabled, isDemo, isDemoAdmin } from "@/core/edition";
|
||||||
import { getVerifiedPluginIds } from "@/lib/marketplace/registryClient";
|
import { getVerifiedPluginIds } from "@/lib/marketplace/registryClient";
|
||||||
|
|
||||||
const ALLOWED_REDIRECT_HOSTS = new Set([
|
const ALLOWED_REDIRECT_HOSTS = new Set([
|
||||||
@@ -49,11 +49,20 @@ export async function GET(request: NextRequest) {
|
|||||||
|
|
||||||
// Not logged in — send to login with this URL as callbackUrl
|
// Not logged in — send to login with this URL as callbackUrl
|
||||||
if (!session?.user) {
|
if (!session?.user) {
|
||||||
const loginUrl = new URL("/login", request.nextUrl.origin);
|
const origin = process.env.NEXT_PUBLIC_APP_URL || process.env.APP_URL || request.nextUrl.origin;
|
||||||
loginUrl.searchParams.set("callbackUrl", request.nextUrl.toString());
|
const loginUrl = new URL("/login", origin);
|
||||||
|
const callbackPath = request.nextUrl.pathname + request.nextUrl.search;
|
||||||
|
loginUrl.searchParams.set("callbackUrl", callbackPath);
|
||||||
return NextResponse.redirect(loginUrl);
|
return NextResponse.redirect(loginUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isDemo && !isDemoAdmin(session)) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{ error: "Admin access required on Demo edition" },
|
||||||
|
{ status: 403 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const pluginId = searchParams.get("pluginId");
|
const pluginId = searchParams.get("pluginId");
|
||||||
const manifestB64 = searchParams.get("manifest");
|
const manifestB64 = searchParams.get("manifest");
|
||||||
const version = searchParams.get("version") ?? "1.0.0";
|
const version = searchParams.get("version") ?? "1.0.0";
|
||||||
|
|||||||
@@ -21,13 +21,7 @@ export async function POST(request: Request) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// On demo, only the admin session may install plugins
|
|
||||||
if (isDemo && !isDemoAdmin(await auth())) {
|
|
||||||
return withCors(
|
|
||||||
NextResponse.json({ error: "Admin access required" }, { status: 403 }),
|
|
||||||
request,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const rateLimited = marketplaceApiLimiter.check(getClientIp(request));
|
const rateLimited = marketplaceApiLimiter.check(getClientIp(request));
|
||||||
if (rateLimited) return withCors(rateLimited, request);
|
if (rateLimited) return withCors(rateLimited, request);
|
||||||
@@ -38,7 +32,7 @@ export async function POST(request: Request) {
|
|||||||
try {
|
try {
|
||||||
const body = await request.json();
|
const body = await request.json();
|
||||||
const { pluginId, version, manifest } = body;
|
const { pluginId, version, manifest } = body;
|
||||||
console.log("[Marketplace Install Route] Payload received:", JSON.stringify(body, null, 2));
|
console.log(`[Marketplace Install Route] Installing plugin: ${pluginId} v${version || "1.0.0"}`);
|
||||||
|
|
||||||
if (!pluginId || typeof pluginId !== "string") {
|
if (!pluginId || typeof pluginId !== "string") {
|
||||||
return withCors(
|
return withCors(
|
||||||
|
|||||||
@@ -42,7 +42,14 @@ export async function GET(request: Request) {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
const plugins = [...activeDbPlugins, ...builtInRecords];
|
const plugins = [...activeDbPlugins, ...builtInRecords];
|
||||||
return withCors(NextResponse.json({ plugins }), request);
|
|
||||||
|
let canManagePlugins = !isDemo;
|
||||||
|
if (isDemo) {
|
||||||
|
const authError = await validateMarketplaceAuth(request);
|
||||||
|
canManagePlugins = authError === null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return withCors(NextResponse.json({ plugins, canManagePlugins }), request);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("[marketplace/status] Error:", err);
|
console.error("[marketplace/status] Error:", err);
|
||||||
// Fallback: return built-in plugins when DB is unavailable
|
// Fallback: return built-in plugins when DB is unavailable
|
||||||
@@ -52,7 +59,14 @@ export async function GET(request: Request) {
|
|||||||
config: "{}",
|
config: "{}",
|
||||||
installedAt: "",
|
installedAt: "",
|
||||||
}));
|
}));
|
||||||
return withCors(NextResponse.json({ plugins: fallback }), request);
|
|
||||||
|
let canManagePlugins = !isDemo;
|
||||||
|
if (isDemo) {
|
||||||
|
const authError = await validateMarketplaceAuth(request);
|
||||||
|
canManagePlugins = authError === null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return withCors(NextResponse.json({ plugins: fallback, canManagePlugins }), request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,13 +22,7 @@ export async function POST(request: Request) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// On demo, only the admin session may uninstall plugins
|
|
||||||
if (isDemo && !isDemoAdmin(await auth())) {
|
|
||||||
return withCors(
|
|
||||||
NextResponse.json({ error: "Admin access required" }, { status: 403 }),
|
|
||||||
request,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const rateLimited = marketplaceApiLimiter.check(getClientIp(request));
|
const rateLimited = marketplaceApiLimiter.check(getClientIp(request));
|
||||||
if (rateLimited) return withCors(rateLimited, request);
|
if (rateLimited) return withCors(rateLimited, request);
|
||||||
|
|||||||
@@ -92,14 +92,11 @@ export async function POST(req: Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{ error: "All Overpass mirrors failed or timed out. The OSM servers are likely under heavy load." },
|
||||||
error: "All Overpass mirrors failed or timed out. The OSM servers are likely under heavy load.",
|
{ status: 504 }
|
||||||
lastError
|
|
||||||
},
|
|
||||||
{ status: lastError?.status || 504 }
|
|
||||||
);
|
);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.error(`[OSMSearchProxy] Internal error:`, e);
|
console.error(`[OSMSearchProxy] Internal error:`, e);
|
||||||
return NextResponse.json({ error: e.message }, { status: 500 });
|
return NextResponse.json({ error: "Internal server error" }, { status: 500 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,6 +103,7 @@ export function PluginsTab() {
|
|||||||
const [checkingUpdates, setCheckingUpdates] = useState(false);
|
const [checkingUpdates, setCheckingUpdates] = useState(false);
|
||||||
const [updating, setUpdating] = useState<string | null>(null);
|
const [updating, setUpdating] = useState<string | null>(null);
|
||||||
const [needsReload, setNeedsReload] = useState(false);
|
const [needsReload, setNeedsReload] = useState(false);
|
||||||
|
const [canInstall, setCanInstall] = useState<boolean>(isPluginInstallEnabled);
|
||||||
|
|
||||||
const loadPlugins = useCallback(async () => {
|
const loadPlugins = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
@@ -110,6 +111,9 @@ export function PluginsTab() {
|
|||||||
if (!res.ok) return;
|
if (!res.ok) return;
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
setPlugins(data.plugins ?? []);
|
setPlugins(data.plugins ?? []);
|
||||||
|
if (typeof data.canManagePlugins === "boolean") {
|
||||||
|
setCanInstall(data.canManagePlugins);
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
/* non-critical */
|
/* non-critical */
|
||||||
}
|
}
|
||||||
@@ -275,7 +279,7 @@ export function PluginsTab() {
|
|||||||
<TrustBadge trust={getTrust(record)} />
|
<TrustBadge trust={getTrust(record)} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{isPluginInstallEnabled && (
|
{canInstall && (
|
||||||
<div className="plugin-item__actions">
|
<div className="plugin-item__actions">
|
||||||
{updates[record.pluginId] ? (
|
{updates[record.pluginId] ? (
|
||||||
<button
|
<button
|
||||||
@@ -303,27 +307,29 @@ export function PluginsTab() {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="plugins-tab__actions-bottom">
|
{canInstall && (
|
||||||
<button
|
<div className="plugins-tab__actions-bottom">
|
||||||
className="plugins-tab__check-updates"
|
|
||||||
onClick={handleCheckUpdates}
|
|
||||||
disabled={checkingUpdates}
|
|
||||||
>
|
|
||||||
<RefreshCw size={14} className={checkingUpdates ? "spinning" : ""} />
|
|
||||||
{checkingUpdates ? "Checking..." : "Check for Updates"}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{Object.keys(updates).length > 1 && (
|
|
||||||
<button
|
<button
|
||||||
className="plugins-tab__update-all"
|
className="plugins-tab__check-updates"
|
||||||
onClick={handleUpdateAll}
|
onClick={handleCheckUpdates}
|
||||||
disabled={updating !== null}
|
disabled={checkingUpdates}
|
||||||
>
|
>
|
||||||
<Download size={14} />
|
<RefreshCw size={14} className={checkingUpdates ? "spinning" : ""} />
|
||||||
Update All ({Object.keys(updates).length})
|
{checkingUpdates ? "Checking..." : "Check for Updates"}
|
||||||
</button>
|
</button>
|
||||||
)}
|
|
||||||
</div>
|
{Object.keys(updates).length > 1 && (
|
||||||
|
<button
|
||||||
|
className="plugins-tab__update-all"
|
||||||
|
onClick={handleUpdateAll}
|
||||||
|
disabled={updating !== null}
|
||||||
|
>
|
||||||
|
<Download size={14} />
|
||||||
|
Update All ({Object.keys(updates).length})
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<BrowseLink />
|
<BrowseLink />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import { useStore } from "@/core/state/store";
|
import { useStore } from "@/core/state/store";
|
||||||
import { isHistoryEnabled } from "@/core/edition";
|
import { isHistoryEnabled as default_isHistoryEnabled, isDemo, DEMO_ADMIN_ROLE } from "@/core/edition";
|
||||||
|
|
||||||
export function Timeline() {
|
export function Timeline() {
|
||||||
const currentTime = useStore((s) => s.currentTime);
|
const currentTime = useStore((s) => s.currentTime);
|
||||||
@@ -18,11 +18,19 @@ export function Timeline() {
|
|||||||
const timeRange = useStore((s) => s.timeRange);
|
const timeRange = useStore((s) => s.timeRange);
|
||||||
|
|
||||||
const [mounted, setMounted] = useState(false);
|
const [mounted, setMounted] = useState(false);
|
||||||
|
const [isDemoAdmin, setIsDemoAdmin] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setMounted(true);
|
setMounted(true);
|
||||||
|
if (!isDemo) return;
|
||||||
|
fetch("/api/auth/session")
|
||||||
|
.then((r) => r.json())
|
||||||
|
.then((s) => setIsDemoAdmin(s?.user?.role === DEMO_ADMIN_ROLE))
|
||||||
|
.catch(() => {});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const isHistoryEnabled = default_isHistoryEnabled || isDemoAdmin;
|
||||||
|
|
||||||
const totalMs = timeRange.end.getTime() - timeRange.start.getTime();
|
const totalMs = timeRange.end.getTime() - timeRange.start.getTime();
|
||||||
const currentMs = currentTime.getTime() - timeRange.start.getTime();
|
const currentMs = currentTime.getTime() - timeRange.start.getTime();
|
||||||
const progress = totalMs > 0 ? Math.max(0, Math.min(1, currentMs / totalMs)) : 0;
|
const progress = totalMs > 0 ? Math.max(0, Math.min(1, currentMs / totalMs)) : 0;
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ export function useMarketplaceSync() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Load a single manifest into the plugin manager. */
|
|
||||||
async function loadManifest(manifest: PluginManifest) {
|
async function loadManifest(manifest: PluginManifest) {
|
||||||
if (!manifest.id || loadedIds.current.has(manifest.id)) return;
|
if (!manifest.id || loadedIds.current.has(manifest.id)) return;
|
||||||
if (pluginManager.getPlugin(manifest.id)) {
|
if (pluginManager.getPlugin(manifest.id)) {
|
||||||
@@ -73,7 +72,23 @@ export function useMarketplaceSync() {
|
|||||||
try {
|
try {
|
||||||
console.log(`[MarketplaceSync] Loading manifest: ${manifest.id}`);
|
console.log(`[MarketplaceSync] Loading manifest: ${manifest.id}`);
|
||||||
await pluginManager.loadFromManifest(manifest);
|
await pluginManager.loadFromManifest(manifest);
|
||||||
initLayer(manifest.id);
|
|
||||||
|
let shouldEnable = false;
|
||||||
|
if (isDemo) {
|
||||||
|
const envVar = process.env.NEXT_PUBLIC_DEMO_DEFAULT_PLUGINS || "";
|
||||||
|
const demoDefaultPlugins = new Set<string>();
|
||||||
|
envVar.split(",").forEach((s) => {
|
||||||
|
const clean = s.trim();
|
||||||
|
if (clean) demoDefaultPlugins.add(clean);
|
||||||
|
});
|
||||||
|
shouldEnable = demoDefaultPlugins.has(manifest.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
initLayer(manifest.id, shouldEnable);
|
||||||
|
if (shouldEnable) {
|
||||||
|
await pluginManager.enablePlugin(manifest.id);
|
||||||
|
}
|
||||||
|
|
||||||
loadedIds.current.add(manifest.id);
|
loadedIds.current.add(manifest.id);
|
||||||
console.log(`[MarketplaceSync] Hot-loaded plugin "${manifest.id}"`);
|
console.log(`[MarketplaceSync] Hot-loaded plugin "${manifest.id}"`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -48,5 +48,11 @@ export function injectHostGlobals(): void {
|
|||||||
CameraStream,
|
CameraStream,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (process.env.NEXT_PUBLIC_DEFAULT_ENGINE_URL) {
|
||||||
|
(globalThis as any).__WWV_ENGINE_URL__ = process.env.NEXT_PUBLIC_DEFAULT_ENGINE_URL;
|
||||||
|
} else {
|
||||||
|
(globalThis as any).__WWV_ENGINE_URL__ = typeof window !== 'undefined' ? window.location.origin : 'http://localhost:5001';
|
||||||
|
}
|
||||||
|
|
||||||
console.log("[HostGlobals] React and SDK injected for dynamic plugins");
|
console.log("[HostGlobals] React and SDK injected for dynamic plugins");
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import { auth } from "@/lib/auth";
|
import { auth } from "@/lib/auth";
|
||||||
import { verifyMarketplaceToken } from "./marketplaceToken";
|
import { verifyMarketplaceToken } from "./marketplaceToken";
|
||||||
|
import { isDemo, isDemoAdmin } from "@/core/edition";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate marketplace API access. Accepts (in order):
|
* Validate marketplace API access. Accepts (in order):
|
||||||
@@ -13,7 +14,12 @@ export async function validateMarketplaceAuth(
|
|||||||
): Promise<NextResponse | null> {
|
): Promise<NextResponse | null> {
|
||||||
// 1. Try session auth first
|
// 1. Try session auth first
|
||||||
const session = await auth();
|
const session = await auth();
|
||||||
if (session?.user) return null;
|
if (session?.user) {
|
||||||
|
if (isDemo && !isDemoAdmin(session)) {
|
||||||
|
return NextResponse.json({ error: "Admin access required" }, { status: 403 });
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// 2. Try marketplace JWT bearer token
|
// 2. Try marketplace JWT bearer token
|
||||||
const authHeader = request.headers.get("authorization");
|
const authHeader = request.headers.get("authorization");
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const cameraProxyLimiter = new RateLimiter({
|
|||||||
/** /api/marketplace/install-redirect — prevents install spam. */
|
/** /api/marketplace/install-redirect — prevents install spam. */
|
||||||
export const installLimiter = new RateLimiter({
|
export const installLimiter = new RateLimiter({
|
||||||
windowMs: 60_000,
|
windowMs: 60_000,
|
||||||
maxRequests: 10,
|
maxRequests: 60,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** /api/marketplace/grant-token — prevents JWT generation spam. */
|
/** /api/marketplace/grant-token — prevents JWT generation spam. */
|
||||||
@@ -32,7 +32,7 @@ export const grantTokenLimiter = new RateLimiter({
|
|||||||
/** /api/marketplace/status, install, uninstall — general marketplace API. */
|
/** /api/marketplace/status, install, uninstall — general marketplace API. */
|
||||||
export const marketplaceApiLimiter = new RateLimiter({
|
export const marketplaceApiLimiter = new RateLimiter({
|
||||||
windowMs: 60_000,
|
windowMs: 60_000,
|
||||||
maxRequests: 20,
|
maxRequests: 60,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** /api/auth/[...nextauth] — prevents credential brute-force. */
|
/** /api/auth/[...nextauth] — prevents credential brute-force. */
|
||||||
|
|||||||
+10
-4
@@ -47,14 +47,20 @@ export default async function proxy(req: NextRequest) {
|
|||||||
|
|
||||||
// Not logged in — check if first-run (no users)
|
// Not logged in — check if first-run (no users)
|
||||||
try {
|
try {
|
||||||
const url = new URL("/api/auth/setup-status", req.nextUrl.origin);
|
const appUrl = process.env.NEXT_PUBLIC_APP_URL || process.env.APP_URL || `http://127.0.0.1:${process.env.PORT || "3000"}`;
|
||||||
const res = await fetch(url);
|
const url = new URL("/api/auth/setup-status", appUrl);
|
||||||
|
const res = await fetch(url.toString(), {
|
||||||
|
headers: {
|
||||||
|
"User-Agent": "WorldWideView-Middleware",
|
||||||
|
}
|
||||||
|
});
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
if (data.needsSetup) {
|
if (data.needsSetup) {
|
||||||
return NextResponse.redirect(new URL("/setup", req.nextUrl));
|
return NextResponse.redirect(new URL("/setup", req.nextUrl)); // NextResponse.redirect correctly bounds redirect to client
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (e) {
|
||||||
// Fall through to login redirect
|
// Fall through to login redirect
|
||||||
|
console.error("[proxy.ts] Failed to fetch setup status:", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NextResponse.redirect(new URL("/login", req.nextUrl));
|
return NextResponse.redirect(new URL("/login", req.nextUrl));
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
**Describe the bug**
|
||||||
|
Plugins fail to load on the production Coolify deployment:
|
||||||
|
1. `military-bases` fails to load with `ManifestLoadError: Failed to load valid WorldPlugin from bundle`.
|
||||||
|
2. Several runtime plugins (satellite, iranwarlive, gps-jamming) try to fetch from `localhost:5001` resulting in connection refused in production.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
1. Deploy WWV to a non-local environment like Coolify.
|
||||||
|
2. Enable `military-bases`. Observe error in console.
|
||||||
|
3. Enable `satellite` or other data plugins. Observe the browser network tab failing to reach `localhost:5001`.
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
Plugins correctly inherit `NEXT_PUBLIC_DEFAULT_ENGINE_URL` dynamically from the host `globalThis` environment. Static plugins correctly instantiate as static instead of evaluating to a bundle.
|
||||||
|
|
||||||
|
**Screenshots/Logs**
|
||||||
|
`[MarketplaceSync] Failed to load "military-bases": ... Failed to load valid WorldPlugin from bundle`
|
||||||
|
|
||||||
|
**Environment:**
|
||||||
|
- OS: Server/Coolify
|
||||||
|
- Browser: Any
|
||||||
|
- WorldWideView Edition: demo
|
||||||
Reference in new issue
Block a user