@kubitnodes/stellaris 0.3.25 → 0.3.26
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.
- package/dist/cli/index.js +1 -1
- package/dist/server/index.js +16 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -2084,7 +2084,7 @@ var RunnerConfigSchema = z13.object({
|
|
|
2084
2084
|
});
|
|
2085
2085
|
|
|
2086
2086
|
// packages/shared/dist/version.js
|
|
2087
|
-
var STELLARIS_VERSION = "0.3.
|
|
2087
|
+
var STELLARIS_VERSION = "0.3.26";
|
|
2088
2088
|
|
|
2089
2089
|
// packages/shared/dist/mentions.js
|
|
2090
2090
|
import { parse, postprocess, preprocess } from "micromark";
|
package/dist/server/index.js
CHANGED
|
@@ -2257,7 +2257,7 @@ var RunnerConfigSchema = z13.object({
|
|
|
2257
2257
|
});
|
|
2258
2258
|
|
|
2259
2259
|
// packages/shared/dist/version.js
|
|
2260
|
-
var STELLARIS_VERSION = "0.3.
|
|
2260
|
+
var STELLARIS_VERSION = "0.3.26";
|
|
2261
2261
|
|
|
2262
2262
|
// packages/shared/dist/mentions.js
|
|
2263
2263
|
import { parse, postprocess, preprocess } from "micromark";
|
|
@@ -12418,9 +12418,21 @@ function githubAvatar(url) {
|
|
|
12418
12418
|
return void 0;
|
|
12419
12419
|
}
|
|
12420
12420
|
}
|
|
12421
|
+
var BOARD_ORIGIN = "https://board.invalid";
|
|
12421
12422
|
function safeNext(next) {
|
|
12422
|
-
|
|
12423
|
+
if (next === void 0 || !next.startsWith("/")) {
|
|
12424
|
+
return "/";
|
|
12425
|
+
}
|
|
12426
|
+
let url;
|
|
12427
|
+
try {
|
|
12428
|
+
url = new URL(next, BOARD_ORIGIN);
|
|
12429
|
+
} catch {
|
|
12430
|
+
return "/";
|
|
12431
|
+
}
|
|
12432
|
+
const path11 = `${url.pathname}${url.search}`;
|
|
12433
|
+
return url.origin === BOARD_ORIGIN && /^\/(?![/\\])/.test(path11) ? path11 : "/";
|
|
12423
12434
|
}
|
|
12435
|
+
var APP_LANDING = "stellaris://signin";
|
|
12424
12436
|
function land(c, next, fragment) {
|
|
12425
12437
|
return c.redirect(`${next}#${fragment}`, 302);
|
|
12426
12438
|
}
|
|
@@ -12441,7 +12453,8 @@ function githubAuthRoutes(options) {
|
|
|
12441
12453
|
}
|
|
12442
12454
|
}
|
|
12443
12455
|
const state = randomBytes2(24).toString("base64url");
|
|
12444
|
-
|
|
12456
|
+
const next = c.req.query("landing") === "app" ? APP_LANDING : safeNext(c.req.query("next"));
|
|
12457
|
+
states.set(state, { next, expiresAt: now() + STATE_TTL_MS });
|
|
12445
12458
|
const authorize = new URL("https://github.com/login/oauth/authorize");
|
|
12446
12459
|
authorize.searchParams.set("client_id", github.clientId);
|
|
12447
12460
|
authorize.searchParams.set("state", state);
|