@moinulmoin/eden-runtime-cloudflare 0.11.2 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26295,16 +26295,13 @@ async function routeEveOutboundRequest(request, env, sourceDeploymentId, expecte
|
|
|
26295
26295
|
if (env.EDEN_EVE_DEPLOYMENTS !== void 0 && route === void 0) {
|
|
26296
26296
|
return new Response("Deployment retired; its sessions ended.", { status: 403 });
|
|
26297
26297
|
}
|
|
26298
|
-
const
|
|
26299
|
-
|
|
26300
|
-
|
|
26301
|
-
|
|
26302
|
-
|
|
26303
|
-
|
|
26304
|
-
|
|
26305
|
-
if (expected.length === 0 || actual.length !== expected.length || !subtle.timingSafeEqual(actual, expected)) {
|
|
26306
|
-
return new Response(null, { status: 403 });
|
|
26307
|
-
}
|
|
26298
|
+
const supplied = request.headers.get("x-eden-world-token") ?? "";
|
|
26299
|
+
const encoder = new TextEncoder();
|
|
26300
|
+
const expected = encoder.encode(expectedWorldToken ?? "");
|
|
26301
|
+
const actual = encoder.encode(supplied);
|
|
26302
|
+
const subtle = crypto.subtle;
|
|
26303
|
+
if (expected.length === 0 || actual.length !== expected.length || !subtle.timingSafeEqual(actual, expected)) {
|
|
26304
|
+
return new Response(null, { status: 403 });
|
|
26308
26305
|
}
|
|
26309
26306
|
const world = env.EDEN_WORLD;
|
|
26310
26307
|
if (world === void 0) return new Response(null, { status: 404 });
|
package/dist/eve-host-runtime.js
CHANGED
|
@@ -288,17 +288,13 @@ export async function routeEveOutboundRequest(request, env, sourceDeploymentId,
|
|
|
288
288
|
if (env.EDEN_EVE_DEPLOYMENTS !== undefined && route === undefined) {
|
|
289
289
|
return new Response("Deployment retired; its sessions ended.", { status: 403 });
|
|
290
290
|
}
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
const subtle = crypto.subtle;
|
|
299
|
-
if (expected.length === 0 || actual.length !== expected.length || !subtle.timingSafeEqual(actual, expected)) {
|
|
300
|
-
return new Response(null, { status: 403 });
|
|
301
|
-
}
|
|
291
|
+
const supplied = request.headers.get("x-eden-world-token") ?? "";
|
|
292
|
+
const encoder = new TextEncoder();
|
|
293
|
+
const expected = encoder.encode(expectedWorldToken ?? "");
|
|
294
|
+
const actual = encoder.encode(supplied);
|
|
295
|
+
const subtle = crypto.subtle;
|
|
296
|
+
if (expected.length === 0 || actual.length !== expected.length || !subtle.timingSafeEqual(actual, expected)) {
|
|
297
|
+
return new Response(null, { status: 403 });
|
|
302
298
|
}
|
|
303
299
|
const world = env.EDEN_WORLD;
|
|
304
300
|
if (world === undefined)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moinulmoin/eden-runtime-cloudflare",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"description": "Cloudflare Worker/Container host runtime for Eden's Eve deployments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"NOTICE"
|
|
21
21
|
],
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@moinulmoin/eden-world-cloudflare": "0.11.
|
|
23
|
+
"@moinulmoin/eden-world-cloudflare": "0.11.3",
|
|
24
24
|
"@cloudflare/workers-types": "5.20261006.1"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|