Fix verification bypasses, bound state, and clean up browser sessions - #50
Merged
Merged
Conversation
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.
What and why
Malformed requests could terminate the Node server, npm library tokens could be replayed, and mismatched signal commitments or skipped challenge delays could still mint tokens. This change makes those verification prerequisites independent of the weighted bot score and fixes the associated performance and browser lifecycle issues across the supported implementations.
Validation
go vet ./...andgo test -race ./...passed, including valid/tampered commitment requests through both HTTP scoring endpoints.git diff --checkpassed.Checklist
Verification classification
These are precondition fixes: a bad signal commitment or unmet minimum challenge age prevents token issuance regardless of the weighted score. No new detector is added.
Compatibility notes
minAgeMsand provide the matching serialized signals when submitting a committed proof. Deploy the updated widget with the server fixes.engine.verify()calls throw an error withstatus: 400for malformed signals. A full local Node replay store returnstoken_store_full, mapped to Siteverifyinternal-error.FCAPTCHA_LOG_ACCESS=1. Verdict logging retains its separate setting.server-node/server.jsnow exports{ app, start }without starting a listener; programmatic consumers should callstart(). Runningnode server.jsornpm startcontinues to start the server.