fix(web): embed challenge ID into generated pages

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-08-02 20:10:57 +00:00
parent 5831002762
commit 02fc1079cc
9 changed files with 57 additions and 59 deletions

View File

@@ -152,7 +152,7 @@ const t = (key) => translations[`js_${key}`] || translations[key] || key;
const t0 = Date.now();
const { hash, nonce } = await process(
{ basePrefix, version: anubisVersion },
challenge,
challenge.randomData,
rules.difficulty,
null,
(iters) => {
@@ -208,6 +208,7 @@ const t = (key) => translations[`js_${key}`] || translations[key] || key;
const redir = window.location.href;
window.location.replace(
u(`${basePrefix}/.within.website/x/cmd/anubis/api/pass-challenge`, {
id: challenge.id,
response: hash,
nonce,
redir,
@@ -222,6 +223,7 @@ const t = (key) => translations[`js_${key}`] || translations[key] || key;
const redir = window.location.href;
window.location.replace(
u(`${basePrefix}/.within.website/x/cmd/anubis/api/pass-challenge`, {
id: challenge.id,
response: hash,
nonce,
redir,