Compare commits

..
Author SHA1 Message Date
Antigravity AI c60a0c9d56 fix(core): fix production plugin loading errors [Patch]
- inject engine URL into globalThis for runtime bundle plugins
- update satellite, iranwarlive, gps-jamming to read global reference
- fix military-bases loaded as bundle by SQLite db format override
2026-04-18 18:44:49 +12:00
Silvertakana 05b2dce394 Merge pull request #34 from silvertakana/bug/33-security-hardening
fix: harden endpoints against SSRF, DNS rebinding, open redirects, and error leaks
2026-04-18 16:53:40 +12:00
6 changed files with 31 additions and 3 deletions

No files matched your search

+1
View File
@@ -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
View File
@@ -1,6 +1,6 @@
{
"name": "worldwideview",
"version": "1.13.3",
"version": "1.13.4",
"private": true,
"scripts": {
"setup": "node scripts/setup.mjs",
+1
View File
@@ -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';
+6
View File
@@ -48,5 +48,11 @@ export function injectHostGlobals(): void {
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");
}
+2 -2
View File
@@ -20,7 +20,7 @@ export const cameraProxyLimiter = new RateLimiter({
/** /api/marketplace/install-redirect — prevents install spam. */
export const installLimiter = new RateLimiter({
windowMs: 60_000,
maxRequests: 10,
maxRequests: 60,
});
/** /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. */
export const marketplaceApiLimiter = new RateLimiter({
windowMs: 60_000,
maxRequests: 20,
maxRequests: 60,
});
/** /api/auth/[...nextauth] — prevents credential brute-force. */
+20
View File
@@ -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