Repository navigation
Keep the server up when a request fails and accept trailing-slash paths - #4
Merged
Merged
Conversation
A thrown exception inside any endpoint used to escape handleReact; the HttpServer error handler then called logError(fatal) and closed the listener, so one failing request took the verifier offline. Requests now get a 500 and a warning log instead, and the error handler is no longer fatal. logError accepts Throwable like the handler already passed it. Civilizationbot's default verify_url ends with a slash (http://valzargaming.com:8080/verified/), which routed to 404 because endpoints are matched by exact path. Paths are now normalised before lookup in route(), handleEndpoint() and getEndpoint(). Also: compare tokens with hash_equals, fix the explode() argument order in the stream-socket handler, and fix getSS14State() reading a property with the wrong case (it always returned null). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WTP2S4qKEFT8a6a6yFEL4
Member
Author
|
2026-11-06: head 3e103e3. Local: Generated by Claude Code |
This was referenced Nov 6, 2026
Key OAuth2 sessions by cookie, call providers asynchronously and deprecate the stream-socket mode
#8
Merged
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.
Requested by Val · project thread
Problem
handleReact. ReactPHP'sHttpServerthen emittederror, and the handler calledlogError($e, true), which closes the listening socket. One failing request took the whole verifier offline until restart. Reproduced with a state whosegetVerifyList()throws.verify_urlishttp://valzargaming.com:8080/verified/. Endpoints are matched by exact path, so/verified/returned 404 (reproduced throughhandleReact). Only the in-process bot path, which bypasses routing, was unaffected.getSS14State()read$this->SS14state; the property is$ss14state, so it always returned null.handleResource()hadexplode($sender, ':')with the arguments swapped.!==; nowhash_equals.Change
handleReactcatchesThrowable, logs a warning and answers 500. The HTTP server error handler is no longer fatal.logErroracceptsThrowable, which is what the handler already passed.Server::normalizePath()collapses trailing slashes inroute(),handleEndpoint()andgetEndpoint();/still aliases/verified.Compatibility with Civilizationbot
No change to the fields, statuses,
arrayToRequestStringformat,handleEndpointsignature orgetState()/getEndpoint()return types. The bot'stests/verifier-integration.phpcall pattern was replayed against this branch (combined with the other three open PRs) and passed. After merge the bot'scomposer.jsonpin (vzgcoders/verifier-serverdev-main#838750d…) needs bumping.Verification
New
tests/isolated/RequestRobustnessTest.phpcovers the 500-not-close behaviour, trailing slashes on GET/POST/handleEndpoint, the unauthorized path and the SS14 accessor.Generated by Claude Code