Repository navigation
fix: stop slow ALTCHA solves from rejecting real submissions - #8
Merged
Merged
Conversation
A form submitted before the background proof finished posted an empty
altcha field (logged as reason=missing), and the AJAX re-render restarted
the proof from zero so quick retries failed the same way. A solve that hit
the widget's 90s timeout ("Failed to find solution.") was never retried.
- Hold Gravity Forms submissions in gform/submission/pre_submission until
the proof is solved (or has failed for good).
- Retry a failed solve with a fresh challenge, up to 3 times.
- Correct the strength labels: browser PBKDF2 runs ~1M iterations/s per
core, so Very high (1M) averages ~25s on a fast desktop and exceeds the
90s timeout on ordinary laptops.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Snellman reported intermittent "Sorry, your submission could not be verified" on forms 43/45 (cost set to Very high, 1M), with
ALTCHA [name=altcha] verification failed Error: Failed to find solution.in the console. The GF log shows every rejection asreason: missing, in bursts of retries seconds apart.auto="onload"only starts the proof; submitting before it finishes posts an emptyaltchafield.errorand is never retried.Changes
gform/submission/pre_submissionfilter until the proof is solved or has failed for good. GF keeps its spinner up meanwhile.error, fetch a fresh challenge and retry, capped at 3 retries.Tested
Against snellmanrecipes locally (form 43, cost 1M), with this build swapped in:
composer test(67 tests) andcomposer lintpass.🤖 Generated with Claude Code