From 54bdd77f81d9534e1d06aca23a4ee30ce69d54e5 Mon Sep 17 00:00:00 2001 From: y a t s <140337963+y-a-t-s@users.noreply.github.com> Date: Sun, 25 Jan 2026 16:29:01 -0500 Subject: [PATCH] Minor fixes --- cerberus.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cerberus.go b/cerberus.go index 988fa04..247fdab 100644 --- a/cerberus.go +++ b/cerberus.go @@ -13,14 +13,14 @@ import ( type Challenge struct { Salt string // Challenge salt from server. Diff uint32 // Difficulty level. - Steps uint32 // Time limit for answer in minutes. + Steps uint32 // Not 100% sure how this is used yet. host *url.URL } type Solution struct { Salt string Nonce uint32 - Redirect string + Redirect string // To be set manually by caller. Hash []byte host *url.URL @@ -32,7 +32,6 @@ func genHashes(ctx context.Context, c Challenge) <-chan Solution { out = make(chan Solution, 1) sha = sha256.New() nonce = rand.Uint32() - redirect = "/" // TODO: figure out non-homepage redirects. ) go func() { @@ -50,7 +49,7 @@ func genHashes(ctx context.Context, c Challenge) <-chan Solution { sol := Solution{ Salt: c.Salt, Nonce: nonce, - Redirect: redirect, + Redirect: "/", // Use sensible default for placeholder. Hash: sha.Sum(nil), } // Ensure we don't hang if out channel is full on ctx close.