Skip to content

fix: nil deref when solve request lands on a different DIFFICULTY than the original req#1467

Merged
Xe merged 2 commits intomainfrom
json/fix-pow-deref
Mar 18, 2026
Merged

fix: nil deref when solve request lands on a different DIFFICULTY than the original req#1467
Xe merged 2 commits intomainfrom
json/fix-pow-deref

Conversation

@JasonLovesDoggo
Copy link
Copy Markdown
Member

@JasonLovesDoggo JasonLovesDoggo commented Feb 18, 2026

PassChallenge re-evaluates the policy when the user submits their solution. If the weight lands on a different threshold (e.g. ALLOW instead of CHALLENGE), rule.Challenge is nil and the server panics. Fixes the root cause in check(), guards pre-hydration dereferences, and adds Valid() input validation to all challenge implementations.

Fixes: #1463

Checklist:

  • Added a description of the changes to the [Unreleased] section of docs/docs/CHANGELOG.md
  • Added test cases to the relevant parts of the codebase
  • Ran integration tests npm run test:integration (unsupported on Windows, please use WSL)
  • All of my commits have verified signatures

Signed-off-by: Jason Cameron <jason.cameron@stanwith.me>
@JasonLovesDoggo JasonLovesDoggo marked this pull request as ready for review February 18, 2026 19:20
Signed-off-by: Jason Cameron <git@jasoncameron.dev>
@Xe Xe merged commit c7b31d0 into main Mar 18, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http: panic serving 127.0.0.1:52184: runtime error: invalid memory address or nil pointer dereference

2 participants