Skip to content

v0.6.0

Choose a tag to compare

@oxyc oxyc released this 31 Jul 10:54
· 1 commit to main since this release
v0.6.0

Fixes

Renew the proof when its challenge expires (#5)

The widget solved its proof once, on load, and the challenge is only valid for 600s. When that window closed the widget moved to expired and cleared the solution without re-solving. On a long form — a 400+ option product dropdown, two date pickers, an address block, a file upload — ten minutes is an ordinary amount of time to spend, and submitting past it failed validation with a form-level message that highlighted no field, losing everything the visitor had typed.

The widget now re-solves on expired, fetching a fresh challenge. Renewal is parked while the tab is hidden and resumes on visibilitychange, so backgrounded tabs don't grind proof-of-work for nothing. A MutationObserver covers widgets Gravity Forms re-renders after AJAX submissions and multi-page navigation. display="invisible" means none of it is visible to the visitor.

Improvements

Record why a verification failed (#6)

The decision log flattened every rejection into missing or invalid, which made an expired challenge indistinguishable from a forged one — opposite problems with the same log line. Challenge::classify() now surfaces the reason the altcha-org/altcha library already computes:

ok · missing · malformed · expired · invalid_signature · invalid_solution · replay

verify() keeps its bool contract and delegates to classify(), so there's a single parsing path. Expired challenges also log expired_for — seconds past expiresAt — which shows whether the renewal above is holding up in the field.

No change to what gets accepted or rejected; only to what's recorded. Enable it under Forms → Settings → Logging.

Full changelog: v0.5.0...v0.6.0