Repository navigation
fix: say when an app's address can't be looked up (#335) - #362
Merged
Merged
Conversation
Sign-in by address on WordPress Playground and Studio stopped with "That address resolves to a private or unreachable network", because PHP there has no DNS. fetch_json() now tells the two cases apart: a host that can't be looked up names the host and points to a key; a private address keeps the old message. Both stay refused; the guard is unchanged. Closes #335 Co-Authored-By: Claude Opus 5.5 <[email protected]>
3 tasks
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.
Closes #335
What
When sign-in by address can't read an app's identity document because this server can't look up the app's host, the authorize page now says so, names the host, and suggests a key. It used to say the address "resolves to a private or unreachable network", which sent people looking for a network problem.
Why
PHP on WordPress Playground and Studio has no DNS, so
claude.aiandchatgpt.comnever resolve there. Found in the #223 real-app pass.How
Saddle_HTTP::url_is_safe()is unchanged in behaviour and still fails closed. Its lookup moved into a privateresolve()sofetch_json()can ask, after a refusal, whether the host resolved at all.saddle_http_unresolvedfor "could not look up";saddle_http_blockedkeeps the private-network case..potregenerated: one new string.Testing
vendor/bin/phpunit --filter 'HTTP_Fetch_JSON|Media_SSRF|OAuth': 125 tests OK (PHP 8.2)vendor/bin/phpcsclean onincludes/tests/http-fetch-json-test.php: unresolvable host names itself and points to a key; private and link-local addresses keep the old message; the guard still refuses; the sign-in flow passes the reason through.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.